DescriptionMaterial Design: Fix MdLabelButton not updating text colors on theme changes
MdTextButton previously had this code:
if (!explicitly_set_normal_color())
LabelButton::SetEnabledTextColors(theme->GetSystemColor(fg_color_id));
The call to SetEnabledTextColors() caused subsequent calls to
explicitly_set_normal_color() to be true, even though the colors were
inferred from the native theme. When using the Gtk3 theme, when
Chrome first starts, GetNativeTheme() doesn't return an instance of
NativeThemeGtk3, so when the initial text color is set, it's using an
old theme. This was causing the "Set Chrome as default" button to
have incorrect colors (but for some reason the background had the
right color).
The fix in this CL is to reset explicitly_set_text_colors_ after
SetEnabledTextColors().
R=estade@chromium.org
CC=erg@chromium.org
Review-Url: https://codereview.chromium.org/2620453005
Cr-Commit-Position: refs/heads/master@{#442463}
Committed: https://chromium.googlesource.com/chromium/src/+/532dbca20c3c49d6f543e6fe137f8b7e21832bb1
Patch Set 1 #Patch Set 2 : Refactor #
Total comments: 2
Patch Set 3 : Add [set_]explicitly_set_text_colors() #
Total comments: 4
Patch Set 4 : const & #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 17 (5 generated)
|