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

Side by Side Diff: ash/common/system/date/system_info_default_view.cc

Issue 2605513002: [ash-md] Changed the system info row height to 40 (instead of 48). (Closed)
Patch Set: Created 3 years, 12 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
« no previous file with comments | « ash/common/system/date/date_view.cc ('k') | ash/common/system/tray/tray_constants.h » ('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 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/date/system_info_default_view.h" 5 #include "ash/common/system/date/system_info_default_view.h"
6 6
7 #include "ash/common/system/chromeos/power/power_status.h" 7 #include "ash/common/system/chromeos/power/power_status.h"
8 #include "ash/common/system/chromeos/power/power_status_view.h" 8 #include "ash/common/system/chromeos/power/power_status_view.h"
9 #include "ash/common/system/date/date_view.h" 9 #include "ash/common/system/date/date_view.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
(...skipping 11 matching lines...) Expand all
22 const int kMinNumTileWidths = 2; 22 const int kMinNumTileWidths = 2;
23 23
24 // The maximum number of menu button widths that the date view should span 24 // The maximum number of menu button widths that the date view should span
25 // horizontally. 25 // horizontally.
26 const int kMaxNumTileWidths = 3; 26 const int kMaxNumTileWidths = 3;
27 27
28 SystemInfoDefaultView::SystemInfoDefaultView(SystemTrayItem* owner, 28 SystemInfoDefaultView::SystemInfoDefaultView(SystemTrayItem* owner,
29 LoginStatus login) 29 LoginStatus login)
30 : date_view_(nullptr), 30 : date_view_(nullptr),
31 tri_view_(TrayPopupUtils::CreateMultiTargetRowView()) { 31 tri_view_(TrayPopupUtils::CreateMultiTargetRowView()) {
32 tri_view_->SetMinHeight(kTrayPopupSystemInfoRowHeight);
32 AddChildView(tri_view_); 33 AddChildView(tri_view_);
33 SetLayoutManager(new views::FillLayout); 34 SetLayoutManager(new views::FillLayout);
34 35
35 date_view_ = new tray::DateView(owner); 36 date_view_ = new tray::DateView(owner);
36 tri_view_->AddView(TriView::Container::START, date_view_); 37 tri_view_->AddView(TriView::Container::START, date_view_);
37 38
38 if (PowerStatus::Get()->IsBatteryPresent()) { 39 if (PowerStatus::Get()->IsBatteryPresent()) {
39 power_status_view_ = new ash::PowerStatusView(false); 40 power_status_view_ = new ash::PowerStatusView(false);
40 std::unique_ptr<views::BoxLayout> box_layout = 41 std::unique_ptr<views::BoxLayout> box_layout =
41 base::MakeUnique<views::BoxLayout>(views::BoxLayout::kHorizontal, 0, 0, 42 base::MakeUnique<views::BoxLayout>(views::BoxLayout::kHorizontal, 0, 0,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 num_extra_tile_widths = std::ceil(preferred_width_ratio); 86 num_extra_tile_widths = std::ceil(preferred_width_ratio);
86 } 87 }
87 num_extra_tile_widths = 88 num_extra_tile_widths =
88 std::max(kMinNumTileWidths - 1, 89 std::max(kMinNumTileWidths - 1,
89 std::min(num_extra_tile_widths, kMaxNumTileWidths - 1)); 90 std::min(num_extra_tile_widths, kMaxNumTileWidths - 1));
90 91
91 return kMenuButtonSize + num_extra_tile_widths * snap_to_width; 92 return kMenuButtonSize + num_extra_tile_widths * snap_to_width;
92 } 93 }
93 94
94 } // namespace ash 95 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/date/date_view.cc ('k') | ash/common/system/tray/tray_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698