| Index: ash/common/system/tray/fixed_sized_scroll_view.cc
|
| diff --git a/ash/common/system/tray/fixed_sized_scroll_view.cc b/ash/common/system/tray/fixed_sized_scroll_view.cc
|
| index 4bc89220354cb76bb65108bd524b0fc8f2d64306..52bf75ac0c8af6541a6261c486bf79650b258987 100644
|
| --- a/ash/common/system/tray/fixed_sized_scroll_view.cc
|
| +++ b/ash/common/system/tray/fixed_sized_scroll_view.cc
|
| @@ -28,7 +28,8 @@ FixedSizedScrollView::~FixedSizedScrollView() {}
|
|
|
| void FixedSizedScrollView::SetContentsView(views::View* view) {
|
| SetContents(view);
|
| - view->SetBoundsRect(gfx::Rect(view->GetPreferredSize()));
|
| + if (!UseMd())
|
| + view->SetBoundsRect(gfx::Rect(view->GetPreferredSize()));
|
| }
|
|
|
| void FixedSizedScrollView::SetFixedSize(const gfx::Size& size) {
|
| @@ -45,6 +46,9 @@ void FixedSizedScrollView::set_fixed_size(const gfx::Size& size) {
|
| }
|
|
|
| gfx::Size FixedSizedScrollView::GetPreferredSize() const {
|
| + if (UseMd())
|
| + return views::View::GetPreferredSize();
|
| +
|
| gfx::Size size =
|
| fixed_size_.IsEmpty() ? contents()->GetPreferredSize() : fixed_size_;
|
| gfx::Insets insets = GetInsets();
|
| @@ -53,10 +57,8 @@ gfx::Size FixedSizedScrollView::GetPreferredSize() const {
|
| }
|
|
|
| void FixedSizedScrollView::Layout() {
|
| - if (UseMd()) {
|
| - views::ScrollView::Layout();
|
| - return;
|
| - }
|
| + if (UseMd())
|
| + return views::ScrollView::Layout();
|
|
|
| gfx::Rect bounds = gfx::Rect(contents()->GetPreferredSize());
|
| bounds.set_width(std::max(0, width() - GetScrollBarWidth()));
|
|
|