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

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

Issue 2489883005: Fix a couple issues with sticky headers (Closed)
Patch Set: rebase 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
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69050a7d944225076d23ceda2e2499a2e9750026..60f36e275f7151a16d0d0d4a0c1777769d9d9b52 100644
--- a/ash/common/system/tray/tray_popup_utils.cc
+++ b/ash/common/system/tray/tray_popup_utils.cc
@@ -5,6 +5,7 @@
#include "ash/common/system/tray/tray_popup_utils.h"
#include "ash/common/ash_constants.h"
+#include "ash/common/ash_view_ids.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/system/tray/fixed_sized_image_view.h"
@@ -14,6 +15,7 @@
#include "ash/common/system/tray/tray_popup_label_button_border.h"
#include "ash/common/wm_shell.h"
#include "ui/views/animation/ink_drop_impl.h"
+#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/label_button.h"
@@ -220,6 +222,14 @@ views::Slider* TrayPopupUtils::CreateSlider(views::SliderListener* listener) {
return slider;
}
+void TrayPopupUtils::ConfigureAsStickyHeader(views::View* view) {
+ view->set_id(VIEW_ID_STICKY_HEADER);
+ view->set_background(
+ views::Background::CreateSolidBackground(kBackgroundColor));
+ view->SetBorder(
+ views::CreateEmptyBorder(gfx::Insets(kMenuSeparatorVerticalPadding, 0)));
+}
+
void TrayPopupUtils::ConfigureContainer(TriView::Container container,
views::View* container_view) {
container_view->SetLayoutManager(
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698