diff options
Diffstat (limited to 'ash/shelf/shelf_widget.cc')
-rw-r--r-- | ash/shelf/shelf_widget.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc index 606b4d8..74d5abf8 100644 --- a/ash/shelf/shelf_widget.cc +++ b/ash/shelf/shelf_widget.cc @@ -34,6 +34,7 @@ #include "ui/gfx/image/image_skia_operations.h" #include "ui/gfx/skbitmap_operations.h" #include "ui/views/accessible_pane_view.h" +#include "ui/views/layout/fill_layout.h" #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" #include "ui/wm/core/coordinate_conversion.h" @@ -343,7 +344,6 @@ class ShelfWidget::DelegateView : public views::WidgetDelegate, const views::Widget* GetWidget() const override { return View::GetWidget(); } bool CanActivate() const override; - void Layout() override; void ReorderChildLayers(ui::Layer* parent_layer) override; // This will be called when the parent local bounds change. void OnBoundsChanged(const gfx::Rect& old_bounds) override; @@ -406,6 +406,7 @@ ShelfWidget::DelegateView::DelegateView(ShelfWidget* shelf) opaque_foreground_(ui::LAYER_SOLID_COLOR), dimmer_view_(NULL), disable_dimming_animations_for_test_(false) { + SetLayoutManager(new views::FillLayout()); set_allow_deactivate_on_esc(true); opaque_background_.SetColor(SK_ColorBLACK); opaque_background_.SetBounds(GetLocalBounds()); @@ -550,18 +551,6 @@ bool ShelfWidget::DelegateView::CanActivate() const { return false; } -void ShelfWidget::DelegateView::Layout() { - for(int i = 0; i < child_count(); ++i) { - if (shelf_->shelf_layout_manager()->IsHorizontalAlignment()) { - child_at(i)->SetBounds(child_at(i)->x(), child_at(i)->y(), - child_at(i)->width(), height()); - } else { - child_at(i)->SetBounds(child_at(i)->x(), child_at(i)->y(), - width(), child_at(i)->height()); - } - } -} - void ShelfWidget::DelegateView::ReorderChildLayers(ui::Layer* parent_layer) { views::View::ReorderChildLayers(parent_layer); parent_layer->StackAtBottom(&opaque_background_); |