Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: ui/views/controls/scroll_view.cc

Issue 2344703002: Fix task manager's default sizing. (Closed)
Patch Set: rebase + commentary Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | ui/views/controls/table/table_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scroll_view.cc
diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc
index 68ee68fee3eaa8561e097be266a8ec202f448155..daeab4fac3b81a88fe21811375c59d3fe501db24 100644
--- a/ui/views/controls/scroll_view.cc
+++ b/ui/views/controls/scroll_view.cc
@@ -272,12 +272,11 @@ void ScrollView::SetVerticalScrollBar(ScrollBar* vert_sb) {
}
gfx::Size ScrollView::GetPreferredSize() const {
- if (!is_bounded())
- return View::GetPreferredSize();
-
gfx::Size size = contents()->GetPreferredSize();
- size.SetToMax(gfx::Size(size.width(), min_height_));
- size.SetToMin(gfx::Size(size.width(), max_height_));
+ if (is_bounded()) {
+ size.SetToMax(gfx::Size(size.width(), min_height_));
+ size.SetToMin(gfx::Size(size.width(), max_height_));
+ }
gfx::Insets insets = GetInsets();
size.Enlarge(insets.width(), insets.height());
return size;
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | ui/views/controls/table/table_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698