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

Unified Diff: ash/system/tray/tray_popup_utils.cc

Issue 2831023003: Refactor AddScrollListItem() in system menu detailed views (Closed)
Patch Set: Rebased Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/tray_popup_utils.h ('k') | ash/system/tray_accessibility.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_popup_utils.cc
diff --git a/ash/system/tray/tray_popup_utils.cc b/ash/system/tray/tray_popup_utils.cc
index d5bdd0a69e1abc1c8e05e6287ca0868c2c26de7c..d89c0d09cd133c4c653dd0bc0cb88a4d3124541b 100644
--- a/ash/system/tray/tray_popup_utils.cc
+++ b/ash/system/tray/tray_popup_utils.cc
@@ -48,8 +48,8 @@ namespace {
// stretched horizontally and centered vertically.
std::unique_ptr<views::LayoutManager> CreateDefaultCenterLayoutManager() {
// TODO(bruthig): Use constants instead of magic numbers.
- auto box_layout =
- base::MakeUnique<views::BoxLayout>(views::BoxLayout::kVertical, 4, 8, 0);
+ auto box_layout = base::MakeUnique<views::BoxLayout>(
+ views::BoxLayout::kVertical, kTrayPopupLabelHorizontalPadding, 8, 0);
box_layout->set_main_axis_alignment(
views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER);
box_layout->set_cross_axis_alignment(
@@ -174,13 +174,14 @@ TriView* TrayPopupUtils::CreateDefaultRowView() {
return tri_view;
}
-TriView* TrayPopupUtils::CreateSubHeaderRowView() {
- TriView* tri_view = CreateMultiTargetRowView();
- tri_view->SetInsets(gfx::Insets(0, kTrayPopupPaddingHorizontal, 0, 0));
- tri_view->SetContainerVisible(TriView::Container::START, false);
- tri_view->SetContainerLayout(
- TriView::Container::END,
- CreateDefaultLayoutManager(TriView::Container::END));
+TriView* TrayPopupUtils::CreateSubHeaderRowView(bool start_visible) {
+ TriView* tri_view = CreateDefaultRowView();
+ if (!start_visible) {
+ tri_view->SetInsets(gfx::Insets(
+ 0, kTrayPopupPaddingHorizontal - kTrayPopupLabelHorizontalPadding, 0,
+ 0));
+ tri_view->SetContainerVisible(TriView::Container::START, false);
+ }
return tri_view;
}
« no previous file with comments | « ash/system/tray/tray_popup_utils.h ('k') | ash/system/tray_accessibility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698