Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: ash/system/tray/tray_background_view.cc

Issue 22291003: ash:Shelf Update Alternate Layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nl Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/status_area_widget_delegate.cc ('k') | ash/system/tray/tray_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 alignment_ == SHELF_ALIGNMENT_TOP) { 281 alignment_ == SHELF_ALIGNMENT_TOP) {
282 int vertical_padding = kTrayContainerVerticalPaddingBottomAlignment; 282 int vertical_padding = kTrayContainerVerticalPaddingBottomAlignment;
283 int horizontal_padding = kTrayContainerHorizontalPaddingBottomAlignment; 283 int horizontal_padding = kTrayContainerHorizontalPaddingBottomAlignment;
284 if (ash::switches::UseAlternateShelfLayout()) { 284 if (ash::switches::UseAlternateShelfLayout()) {
285 vertical_padding = kPaddingFromEdgeOfShelf; 285 vertical_padding = kPaddingFromEdgeOfShelf;
286 horizontal_padding = kPaddingFromEdgeOfShelf; 286 horizontal_padding = kPaddingFromEdgeOfShelf;
287 } 287 }
288 set_border(views::Border::CreateEmptyBorder( 288 set_border(views::Border::CreateEmptyBorder(
289 vertical_padding, 289 vertical_padding,
290 horizontal_padding, 290 horizontal_padding,
291 horizontal_padding, 291 vertical_padding,
292 vertical_padding)); 292 horizontal_padding));
293 293
294 views::BoxLayout* layout = 294 views::BoxLayout* layout =
295 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); 295 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0);
296 layout->set_spread_blank_space(true); 296 layout->set_spread_blank_space(true);
297 views::View::SetLayoutManager(layout); 297 views::View::SetLayoutManager(layout);
298 } else { 298 } else {
299 int vertical_padding = kTrayContainerVerticalPaddingVerticalAlignment; 299 int vertical_padding = kTrayContainerVerticalPaddingVerticalAlignment;
300 int horizontal_padding = kTrayContainerHorizontalPaddingVerticalAlignment; 300 int horizontal_padding = kTrayContainerHorizontalPaddingVerticalAlignment;
301 if (ash::switches::UseAlternateShelfLayout()) { 301 if (ash::switches::UseAlternateShelfLayout()) {
302 vertical_padding = kPaddingFromEdgeOfShelf; 302 vertical_padding = kPaddingFromEdgeOfShelf;
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 bubble_view->GetWidget()->GetNativeView()->GetRootWindow(); 595 bubble_view->GetWidget()->GetNativeView()->GetRootWindow();
596 ash::internal::ShelfLayoutManager* shelf = 596 ash::internal::ShelfLayoutManager* shelf =
597 ShelfLayoutManager::ForLauncher(root_window); 597 ShelfLayoutManager::ForLauncher(root_window);
598 bubble_view->SetArrowPaintType( 598 bubble_view->SetArrowPaintType(
599 shelf->IsVisible() ? views::BubbleBorder::PAINT_NORMAL : 599 shelf->IsVisible() ? views::BubbleBorder::PAINT_NORMAL :
600 views::BubbleBorder::PAINT_TRANSPARENT); 600 views::BubbleBorder::PAINT_TRANSPARENT);
601 } 601 }
602 602
603 } // namespace internal 603 } // namespace internal
604 } // namespace ash 604 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/status_area_widget_delegate.cc ('k') | ash/system/tray/tray_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698