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

Unified Diff: ui/message_center/views/message_view.cc

Issue 2880243003: Make a layer for popup MessageView (Closed)
Patch Set: Addressed comment Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_view.cc
diff --git a/ui/message_center/views/message_view.cc b/ui/message_center/views/message_view.cc
index 53cbdd0877ecefb42ff73688abd9245dd16684ac..f7a5d4bfb2d4a02806dcad0ee65621eb747ac183 100644
--- a/ui/message_center/views/message_view.cc
+++ b/ui/message_center/views/message_view.cc
@@ -69,6 +69,10 @@ MessageView::MessageView(MessageCenterController* controller,
slide_out_controller_(this, this) {
SetFocusBehavior(FocusBehavior::ALWAYS);
+ // Paint to a dedicated layer to make the layer non-opaque.
+ SetPaintToLayer();
+ layer()->SetFillsBoundsOpaquely(false);
+
// Create the opaque background that's above the view's shadow.
background_view_ = new views::View();
background_view_->set_background(
@@ -99,8 +103,6 @@ gfx::Insets MessageView::GetShadowInsets() {
void MessageView::SetIsNested() {
is_nested_ = true;
- SetPaintToLayer();
- layer()->SetFillsBoundsOpaquely(false);
const auto& shadow =
gfx::ShadowDetails::Get(kShadowElevation, kShadowCornerRadius);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698