| OLD | NEW |
| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, 0, 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_inside_border_insets(gfx::Insets(0, 12, 0, 0)); |
| 172 box_layout->set_main_axis_alignment( | 172 box_layout->set_main_axis_alignment( |
| 173 views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); | 173 views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); |
| 174 box_layout->set_cross_axis_alignment( | 174 box_layout->set_cross_axis_alignment( |
| 175 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); | 175 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); |
| 176 box_layout->set_minimum_cross_axis_size( | 176 box_layout->set_minimum_cross_axis_size( |
| 177 GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT)); | 177 GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT)); |
| 178 SetLayoutManager(box_layout); | 178 SetLayoutManager(box_layout); |
| 179 } else { | 179 } else { |
| 180 SetLayoutManager( | 180 SetLayoutManager( |
| 181 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 Loading... |
| 408 } | 408 } |
| 409 | 409 |
| 410 void TimeView::SetupLabel(views::Label* label) { | 410 void TimeView::SetupLabel(views::Label* label) { |
| 411 label->set_owned_by_client(); | 411 label->set_owned_by_client(); |
| 412 SetupLabelForTray(label); | 412 SetupLabelForTray(label); |
| 413 label->SetElideBehavior(gfx::NO_ELIDE); | 413 label->SetElideBehavior(gfx::NO_ELIDE); |
| 414 } | 414 } |
| 415 | 415 |
| 416 } // namespace tray | 416 } // namespace tray |
| 417 } // namespace ash | 417 } // namespace ash |
| OLD | NEW |