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

Side by Side Diff: ash/system/tray_accessibility.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_accessibility.h" 5 #include "ash/system/tray_accessibility.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/metrics/user_metrics_recorder.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/tray/hover_highlight_view.h" 10 #include "ash/system/tray/hover_highlight_view.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 if (login_ == user::LOGGED_IN_NONE || 211 if (login_ == user::LOGGED_IN_NONE ||
212 login_ == user::LOGGED_IN_LOCKED) 212 login_ == user::LOGGED_IN_LOCKED)
213 return; 213 return;
214 214
215 views::View* bottom_row = new View(); 215 views::View* bottom_row = new View();
216 views::BoxLayout* layout = new 216 views::BoxLayout* layout = new
217 views::BoxLayout(views::BoxLayout::kHorizontal, 217 views::BoxLayout(views::BoxLayout::kHorizontal,
218 kTrayMenuBottomRowPadding, 218 kTrayMenuBottomRowPadding,
219 kTrayMenuBottomRowPadding, 219 kTrayMenuBottomRowPadding,
220 kTrayMenuBottomRowPaddingBetweenItems); 220 kTrayMenuBottomRowPaddingBetweenItems);
221 layout->set_spread_blank_space(true); 221 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL);
222 bottom_row->SetLayoutManager(layout); 222 bottom_row->SetLayoutManager(layout);
223 223
224 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 224 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
225 225
226 TrayPopupLabelButton* help = new TrayPopupLabelButton( 226 TrayPopupLabelButton* help = new TrayPopupLabelButton(
227 this, 227 this,
228 bundle.GetLocalizedString( 228 bundle.GetLocalizedString(
229 IDS_ASH_STATUS_TRAY_ACCESSIBILITY_LEARN_MORE)); 229 IDS_ASH_STATUS_TRAY_ACCESSIBILITY_LEARN_MORE));
230 bottom_row->AddChildView(help); 230 bottom_row->AddChildView(help);
231 help_view_ = help; 231 help_view_ = help;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (detailed_popup_) 427 if (detailed_popup_)
428 detailed_popup_->GetWidget()->Close(); 428 detailed_popup_->GetWidget()->Close();
429 if (detailed_menu_) 429 if (detailed_menu_)
430 detailed_menu_->GetWidget()->Close(); 430 detailed_menu_->GetWidget()->Close();
431 } 431 }
432 432
433 previous_accessibility_state_ = accessibility_state; 433 previous_accessibility_state_ = accessibility_state;
434 } 434 }
435 435
436 } // namespace ash 436 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_background_view.cc ('k') | chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698