| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/system/tray/tray_background_view.h" | 5 #include "ash/system/tray/tray_background_view.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_util.h" | 9 #include "ash/screen_util.h" |
| 10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 if (alignment_ == SHELF_ALIGNMENT_BOTTOM || | 269 if (alignment_ == SHELF_ALIGNMENT_BOTTOM || |
| 270 alignment_ == SHELF_ALIGNMENT_TOP) { | 270 alignment_ == SHELF_ALIGNMENT_TOP) { |
| 271 SetBorder(views::Border::CreateEmptyBorder( | 271 SetBorder(views::Border::CreateEmptyBorder( |
| 272 kPaddingFromEdgeOfShelf, | 272 kPaddingFromEdgeOfShelf, |
| 273 kPaddingFromEdgeOfShelf, | 273 kPaddingFromEdgeOfShelf, |
| 274 kPaddingFromEdgeOfShelf, | 274 kPaddingFromEdgeOfShelf, |
| 275 kPaddingFromEdgeOfShelf)); | 275 kPaddingFromEdgeOfShelf)); |
| 276 | 276 |
| 277 views::BoxLayout* layout = | 277 views::BoxLayout* layout = |
| 278 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); | 278 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); |
| 279 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL); | 279 layout->set_default_flex(1); |
| 280 views::View::SetLayoutManager(layout); | 280 views::View::SetLayoutManager(layout); |
| 281 } else { | 281 } else { |
| 282 SetBorder(views::Border::CreateEmptyBorder( | 282 SetBorder(views::Border::CreateEmptyBorder( |
| 283 kPaddingFromEdgeOfShelf, | 283 kPaddingFromEdgeOfShelf, |
| 284 kPaddingFromEdgeOfShelf, | 284 kPaddingFromEdgeOfShelf, |
| 285 kPaddingFromEdgeOfShelf, | 285 kPaddingFromEdgeOfShelf, |
| 286 kPaddingFromEdgeOfShelf)); | 286 kPaddingFromEdgeOfShelf)); |
| 287 | 287 |
| 288 views::BoxLayout* layout = | 288 views::BoxLayout* layout = |
| 289 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0); | 289 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0); |
| 290 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL); | 290 layout->set_default_flex(1); |
| 291 views::View::SetLayoutManager(layout); | 291 views::View::SetLayoutManager(layout); |
| 292 } | 292 } |
| 293 PreferredSizeChanged(); | 293 PreferredSizeChanged(); |
| 294 } | 294 } |
| 295 | 295 |
| 296 //////////////////////////////////////////////////////////////////////////////// | 296 //////////////////////////////////////////////////////////////////////////////// |
| 297 // TrayBackgroundView | 297 // TrayBackgroundView |
| 298 | 298 |
| 299 TrayBackgroundView::TrayBackgroundView(StatusAreaWidget* status_area_widget) | 299 TrayBackgroundView::TrayBackgroundView(StatusAreaWidget* status_area_widget) |
| 300 : status_area_widget_(status_area_widget), | 300 : status_area_widget_(status_area_widget), |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 background_->set_alpha(kTrayBackgroundAlpha); | 610 background_->set_alpha(kTrayBackgroundAlpha); |
| 611 SchedulePaint(); | 611 SchedulePaint(); |
| 612 } | 612 } |
| 613 | 613 |
| 614 void TrayBackgroundView::UpdateBubbleViewArrow( | 614 void TrayBackgroundView::UpdateBubbleViewArrow( |
| 615 views::TrayBubbleView* bubble_view) { | 615 views::TrayBubbleView* bubble_view) { |
| 616 // Nothing to do here. | 616 // Nothing to do here. |
| 617 } | 617 } |
| 618 | 618 |
| 619 } // namespace ash | 619 } // namespace ash |
| OLD | NEW |