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

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

Issue 256103006: Undo the changes to LabelButton from r266097 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | 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 9032db94be4dad05b18492d8ea853d5788c3c2a7..bbd83623aff8884059cc209ce06e7e5f18946870 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -165,7 +165,10 @@ void LabelButton::SetStyle(ButtonStyle style) {
if (style == STYLE_BUTTON)
set_min_size(gfx::Size(70, 33));
- OnNativeThemeChanged(GetNativeTheme());
+ ResetColorsFromNativeTheme();
+ UpdateThemedBorder(scoped_ptr<Border>(new LabelButtonBorder(style_)));
+ // Invalidate the layout to pickup the new insets from the border.
+ InvalidateLayout();
}
void LabelButton::SetFocusPainter(scoped_ptr<Painter> focus_painter) {
@@ -374,9 +377,6 @@ 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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698