| Index: ash/system/tray/tray_details_view.cc
|
| diff --git a/ash/system/tray/tray_details_view.cc b/ash/system/tray/tray_details_view.cc
|
| index 2d1d1cd0fd6542c2fb035884d4368a6cab43ae97..2b6e74a9b74bb7d4ecbe4b6c0d0734f6f641664f 100644
|
| --- a/ash/system/tray/tray_details_view.cc
|
| +++ b/ash/system/tray/tray_details_view.cc
|
| @@ -59,23 +59,19 @@ void TrayDetailsView::Layout() {
|
|
|
| scroller_->set_fixed_size(gfx::Size());
|
| gfx::Size size = GetPreferredSize();
|
| - if (size.height() < height()) {
|
| - // The available size is larger than the requested size. In this case, do
|
| - // the normal layout, then make sure the footer element is bottom aligned.
|
| - views::View::Layout();
|
| - gfx::Rect fbounds = footer_->bounds();
|
| - fbounds.set_y(height() - footer_->height());
|
| - footer_->SetBoundsRect(fbounds);
|
| - } else {
|
| + if (size.height() > height()) {
|
| // The available size is smaller than the requested size. Squeeze the
|
| - // scroller so that everything fits in the available size, and then do the
|
| - // normal layout.
|
| + // scroller so that everything fits in the available size.
|
| gfx::Size scroller_size = scroll_content_->GetPreferredSize();
|
| scroller_->set_fixed_size(gfx::Size(
|
| width() + scroller_->GetScrollBarWidth(),
|
| scroller_size.height() - (size.height() - height())));
|
| - views::View::Layout();
|
| }
|
| + views::View::Layout();
|
| + // Always make sure the footer element is bottom aligned.
|
| + gfx::Rect fbounds = footer_->bounds();
|
| + fbounds.set_y(height() - footer_->height());
|
| + footer_->SetBoundsRect(fbounds);
|
| }
|
|
|
| } // namespace internal
|
|
|