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

Unified Diff: ui/views/controls/button/label_button.cc

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: fix comments Created 3 years, 11 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
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 21891fca927332c33e9336ab28c08d6d08eabedd..c4bca07210a54f244931ef7e477b6625b6c213df 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -99,7 +99,7 @@ LabelButton::LabelButton(ButtonListener* listener, const base::string16& text)
SetTextInternal(text);
AddChildView(ink_drop_container_);
- ink_drop_container_->SetPaintToLayer(true);
+ ink_drop_container_->SetPaintToLayer();
ink_drop_container_->layer()->SetFillsBoundsOpaquely(false);
ink_drop_container_->SetVisible(false);
@@ -423,13 +423,13 @@ void LabelButton::OnNativeThemeChanged(const ui::NativeTheme* theme) {
}
void LabelButton::AddInkDropLayer(ui::Layer* ink_drop_layer) {
- image()->SetPaintToLayer(true);
+ image()->SetPaintToLayer();
image()->layer()->SetFillsBoundsOpaquely(false);
ink_drop_container_->AddInkDropLayer(ink_drop_layer);
}
void LabelButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
- image()->SetPaintToLayer(false);
+ image()->DestroyLayer();
ink_drop_container_->RemoveInkDropLayer(ink_drop_layer);
}

Powered by Google App Engine
This is Rietveld 408576698