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

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

Issue 243703009: Linux Aura: Use appropriate button style depending on aura/gtk NativeTheme (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updat Created 6 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 | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0cfd1a41a7feadb4572d8e659313359fe1cbab3d..9032db94be4dad05b18492d8ea853d5788c3c2a7 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -165,12 +165,7 @@ void LabelButton::SetStyle(ButtonStyle style) {
if (style == STYLE_BUTTON)
set_min_size(gfx::Size(70, 33));
- ResetColorsFromNativeTheme();
-
- UpdateThemedBorder(scoped_ptr<Border>(new LabelButtonBorder(style_)));
-
- // Invalidate the layout to pickup the new insets from the border.
- InvalidateLayout();
+ OnNativeThemeChanged(GetNativeTheme());
}
void LabelButton::SetFocusPainter(scoped_ptr<Painter> focus_painter) {
@@ -379,6 +374,9 @@ void LabelButton::ChildPreferredSizeChanged(View* child) {
void LabelButton::OnNativeThemeChanged(const ui::NativeTheme* theme) {
ResetColorsFromNativeTheme();
+ UpdateThemedBorder(scoped_ptr<Border>(new LabelButtonBorder(style_)));
+ // Invalidate the layout to pickup the new insets from the border.
+ InvalidateLayout();
}
ui::NativeTheme::Part LabelButton::GetThemePart() const {
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698