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) { |