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

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

Issue 284753002: Add main axis alignment for BoxLayout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove set_spread_blank_space, rename to MainAxisAlignment Created 6 years, 7 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
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/system_tray_bubble.h" 5 #include "ash/system/tray/system_tray_bubble.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/system/tray/system_tray_item.h" 10 #include "ash/system/tray/system_tray_item.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool draw_border) 46 bool draw_border)
47 : hover_(false), 47 : hover_(false),
48 change_background_(change_background) { 48 change_background_(change_background) {
49 set_notify_enter_exit_on_child(true); 49 set_notify_enter_exit_on_child(true);
50 if (draw_border) { 50 if (draw_border) {
51 SetBorder( 51 SetBorder(
52 views::Border::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor)); 52 views::Border::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor));
53 } 53 }
54 views::BoxLayout* layout = new views::BoxLayout( 54 views::BoxLayout* layout = new views::BoxLayout(
55 views::BoxLayout::kVertical, 0, 0, 0); 55 views::BoxLayout::kVertical, 0, 0, 0);
56 layout->set_spread_blank_space(true); 56 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL);
57 SetLayoutManager(layout); 57 SetLayoutManager(layout);
58 SetPaintToLayer(view->layer() != NULL); 58 SetPaintToLayer(view->layer() != NULL);
59 if (view->layer()) 59 if (view->layer())
60 SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely()); 60 SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely());
61 AddChildView(view); 61 AddChildView(view);
62 SetVisible(view->visible()); 62 SetVisible(view->visible());
63 } 63 }
64 64
65 virtual ~TrayPopupItemContainer() {} 65 virtual ~TrayPopupItemContainer() {}
66 66
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // 2 items, which are the bottom header row and the one just above it. 383 // 2 items, which are the bottom header row and the one just above it.
384 bubble_view_->AddChildView(new TrayPopupItemContainer( 384 bubble_view_->AddChildView(new TrayPopupItemContainer(
385 item_views[i], is_default_bubble, 385 item_views[i], is_default_bubble,
386 is_default_bubble && (i < item_views.size() - 2))); 386 is_default_bubble && (i < item_views.size() - 2)));
387 } 387 }
388 if (focus_view) 388 if (focus_view)
389 focus_view->RequestFocus(); 389 focus_view->RequestFocus();
390 } 390 }
391 391
392 } // namespace ash 392 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/network_state_list_detailed_view.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698