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

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

Issue 2530763002: [ash-md] Adjusts layout of lists with sticky header rows to match specs (Closed)
Patch Set: [ash-md] Adjusts layout of lists with sticky header rows to match specs (factory) Created 4 years, 1 month 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
Index: ash/common/system/tray/tray_popup_utils.cc
diff --git a/ash/common/system/tray/tray_popup_utils.cc b/ash/common/system/tray/tray_popup_utils.cc
index b5e3deb294380a84caf165b59617c1bbc0a1994d..e0f16a3163f6d28302aa665ac5c2ecc35b96ef93 100644
--- a/ash/common/system/tray/tray_popup_utils.cc
+++ b/ash/common/system/tray/tray_popup_utils.cc
@@ -188,6 +188,14 @@ TriView* TrayPopupUtils::CreateDefaultRowView() {
return tri_view;
}
+TriView* TrayPopupUtils::CreateSubHeaderRowView() {
+ TriView* tri_view = CreateMultiTargetRowView();
+ tri_view->SetInsets(
+ gfx::Insets(0, 0, 0, GetTrayConstant(TRAY_POPUP_ITEM_RIGHT_INSET)));
+ tri_view->SetContainerVisible(TriView::Container::START, false);
+ return tri_view;
+}
+
TriView* TrayPopupUtils::CreateMultiTargetRowView() {
TriView* tri_view = new TriView(0 /* padding_between_items */);
@@ -427,6 +435,16 @@ views::Separator* TrayPopupUtils::CreateListItemSeparator(bool left_inset) {
return separator;
}
+views::Separator* TrayPopupUtils::CreateListSubHeaderSeparator() {
+ views::Separator* separator =
+ new views::Separator(views::Separator::HORIZONTAL);
+ separator->SetColor(kHorizontalSeparatorColor);
+ separator->SetPreferredSize(kSeparatorWidth);
+ separator->SetBorder(views::CreateEmptyBorder(
+ kMenuSeparatorVerticalPadding - kSeparatorWidth, 0, 0, 0));
+ return separator;
+}
+
bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) {
// TODO(tdanderson): Consider moving this into WmShell, or introduce a
// CanShowSettings() method in each delegate type that has a

Powered by Google App Engine
This is Rietveld 408576698