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

Side by Side Diff: ash/common/system/date/date_view.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 | « no previous file | ash/common/system/tray/tray_popup_utils.cc » ('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/common/system/date/date_view.h" 5 #include "ash/common/system/date/date_view.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/tray/system_tray_controller.h" 8 #include "ash/common/system/tray/system_tray_controller.h"
9 #include "ash/common/system/tray/tray_constants.h" 9 #include "ash/common/system/tray/tray_constants.h"
10 #include "ash/common/system/tray/tray_popup_item_style.h" 10 #include "ash/common/system/tray/tray_popup_item_style.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 UpdateText(); 160 UpdateText();
161 } 161 }
162 162
163 /////////////////////////////////////////////////////////////////////////////// 163 ///////////////////////////////////////////////////////////////////////////////
164 164
165 DateView::DateView(SystemTrayItem* owner) 165 DateView::DateView(SystemTrayItem* owner)
166 : BaseDateTimeView(owner), action_(DateAction::NONE) { 166 : BaseDateTimeView(owner), action_(DateAction::NONE) {
167 if (UseMd()) { 167 if (UseMd()) {
168 // TODO(tdanderson): Tweak spacing and layout for material design. 168 // TODO(tdanderson): Tweak spacing and layout for material design.
169 views::BoxLayout* box_layout = 169 views::BoxLayout* box_layout =
170 new views::BoxLayout(views::BoxLayout::kHorizontal, 8, 0, 0); 170 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0);
171 box_layout->set_inside_border_insets(gfx::Insets(0, 12, 0, 8));
171 box_layout->set_main_axis_alignment( 172 box_layout->set_main_axis_alignment(
172 views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); 173 views::BoxLayout::MAIN_AXIS_ALIGNMENT_START);
173 box_layout->set_cross_axis_alignment( 174 box_layout->set_cross_axis_alignment(
174 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); 175 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER);
175 box_layout->set_minimum_cross_axis_size( 176 box_layout->set_minimum_cross_axis_size(
176 GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT)); 177 GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT));
177 SetLayoutManager(box_layout); 178 SetLayoutManager(box_layout);
178 } else { 179 } else {
179 SetLayoutManager( 180 SetLayoutManager(
180 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 181 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 408 }
408 409
409 void TimeView::SetupLabel(views::Label* label) { 410 void TimeView::SetupLabel(views::Label* label) {
410 label->set_owned_by_client(); 411 label->set_owned_by_client();
411 SetupLabelForTray(label); 412 SetupLabelForTray(label);
412 label->SetElideBehavior(gfx::NO_ELIDE); 413 label->SetElideBehavior(gfx::NO_ELIDE);
413 } 414 }
414 415
415 } // namespace tray 416 } // namespace tray
416 } // namespace ash 417 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698