Commit 8cd77fbf authored by estade@chromium.org's avatar estade@chromium.org

Undo the changes to LabelButton from r266097

This caused breakage because many places create a LabelButton then call SetBorder. By calling SetBorder whenever the NativeTheme changes, the custom border is overridden.

BUG=367614,367625,367607

Review URL: https://codereview.chromium.org/256103006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266736 0039d316-1c4b-4281-b951-d872f2087c98
parent 55a2bbe1
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment