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

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

Issue 2816193002: Introduce a type of View background that stays in sync with its host (Closed)
Patch Set: rebase 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_constants.cc ('k') | ash/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_details_view.cc
diff --git a/ash/system/tray/tray_details_view.cc b/ash/system/tray/tray_details_view.cc
index fee3c723c106d63cc1454d702929a9e98886fbf6..4098c8690647f4b1fa393a5b5e02a4f526bea988 100644
--- a/ash/system/tray/tray_details_view.cc
+++ b/ash/system/tray/tray_details_view.cc
@@ -21,6 +21,7 @@
#include "ui/compositor/paint_recorder.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/skia_paint_util.h"
+#include "ui/native_theme/native_theme.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
@@ -238,7 +239,8 @@ TrayDetailsView::TrayDetailsView(SystemTrayItem* owner)
tri_view_(nullptr),
back_button_(nullptr) {
SetLayoutManager(box_layout_);
- set_background(views::Background::CreateSolidBackground(kBackgroundColor));
+ set_background(views::Background::CreateThemedSolidBackground(
+ this, ui::NativeTheme::kColorId_BubbleBackground));
}
TrayDetailsView::~TrayDetailsView() {}
@@ -295,8 +297,8 @@ void TrayDetailsView::CreateScrollableList() {
// Make the |scroller_| have a layer to clip |scroll_content_|'s children.
// TODO(varkha): Make the sticky rows work with EnableViewPortLayer().
scroller_->SetPaintToLayer();
- scroller_->set_background(
- views::Background::CreateSolidBackground(kBackgroundColor));
+ scroller_->set_background(views::Background::CreateThemedSolidBackground(
+ scroller_, ui::NativeTheme::kColorId_BubbleBackground));
scroller_->layer()->SetMasksToBounds(true);
AddChildView(scroller_);
« no previous file with comments | « ash/system/tray/tray_constants.cc ('k') | ash/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698