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

Unified Diff: ash/system/tray/tray_views.cc

Issue 10384178: ash: Make sure all the sub-popups retain the same height as the main popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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 | « ash/system/tray/tray_item_more.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_views.cc
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc
index 50aa8aa37b65f5d9e1f2c0cb0d73b77e2bdfef83..4874de5660a7415304ca04b9b230ec5484c8ccfb 100644
--- a/ash/system/tray/tray_views.cc
+++ b/ash/system/tray/tray_views.cc
@@ -207,7 +207,8 @@ void FixedSizedScrollView::SetContentsView(View* view) {
}
gfx::Size FixedSizedScrollView::GetPreferredSize() {
- return fixed_size_;
+ return fixed_size_.IsEmpty() ? GetContents()->GetPreferredSize() :
+ fixed_size_;
}
void FixedSizedScrollView::Layout() {
@@ -217,6 +218,11 @@ void FixedSizedScrollView::Layout() {
contents->SetBoundsRect(bounds);
views::ScrollView::Layout();
+ if (!vertical_scroll_bar()->visible()) {
+ gfx::Rect bounds = contents->bounds();
+ bounds.set_width(bounds.width() + GetScrollBarWidth());
+ contents->SetBoundsRect(bounds);
+ }
}
void FixedSizedScrollView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
« no previous file with comments | « ash/system/tray/tray_item_more.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698