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

Side by Side Diff: ash/common/system/tray/tray_popup_utils.cc

Issue 2531713002: [ash-md] Update text layout in system menu. (Closed)
Patch Set: Fixed right padding to be 8. Created 4 years 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
« no previous file with comments | « ash/common/system/date/date_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/common/system/tray/tray_popup_utils.h" 5 #include "ash/common/system/tray/tray_popup_utils.h"
6 6
7 #include "ash/common/ash_constants.h" 7 #include "ash/common/ash_constants.h"
8 #include "ash/common/ash_view_ids.h" 8 #include "ash/common/ash_view_ids.h"
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 26 matching lines...) Expand all
37 37
38 namespace ash { 38 namespace ash {
39 39
40 namespace { 40 namespace {
41 41
42 // Creates a layout manager that positions Views vertically. The Views will be 42 // Creates a layout manager that positions Views vertically. The Views will be
43 // stretched horizontally and centered vertically. 43 // stretched horizontally and centered vertically.
44 std::unique_ptr<views::LayoutManager> CreateDefaultCenterLayoutManager() { 44 std::unique_ptr<views::LayoutManager> CreateDefaultCenterLayoutManager() {
45 // TODO(bruthig): Use constants instead of magic numbers. 45 // TODO(bruthig): Use constants instead of magic numbers.
46 auto box_layout = 46 auto box_layout =
47 base::MakeUnique<views::BoxLayout>(views::BoxLayout::kVertical, 4, 8, 4); 47 base::MakeUnique<views::BoxLayout>(views::BoxLayout::kVertical, 4, 8, 0);
48 box_layout->set_main_axis_alignment( 48 box_layout->set_main_axis_alignment(
49 views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER); 49 views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER);
50 box_layout->set_cross_axis_alignment( 50 box_layout->set_cross_axis_alignment(
51 views::BoxLayout::CROSS_AXIS_ALIGNMENT_STRETCH); 51 views::BoxLayout::CROSS_AXIS_ALIGNMENT_STRETCH);
52 return std::move(box_layout); 52 return std::move(box_layout);
53 } 53 }
54 54
55 // Creates a layout manager that positions Views horizontally. The Views will be 55 // Creates a layout manager that positions Views horizontally. The Views will be
56 // centered along the horizontal and vertical axis. 56 // centered along the horizontal and vertical axis.
57 std::unique_ptr<views::LayoutManager> CreateDefaultEndsLayoutManager() { 57 std::unique_ptr<views::LayoutManager> CreateDefaultEndsLayoutManager() {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) { 430 bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) {
431 // TODO(tdanderson): Consider moving this into WmShell, or introduce a 431 // TODO(tdanderson): Consider moving this into WmShell, or introduce a
432 // CanShowSettings() method in each delegate type that has a 432 // CanShowSettings() method in each delegate type that has a
433 // ShowSettings() method. 433 // ShowSettings() method.
434 return status != LoginStatus::NOT_LOGGED_IN && 434 return status != LoginStatus::NOT_LOGGED_IN &&
435 status != LoginStatus::LOCKED && 435 status != LoginStatus::LOCKED &&
436 !WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); 436 !WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
437 } 437 }
438 438
439 } // namespace ash 439 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/date/date_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698