Skip to content

Commit

Permalink
Fixed unreadable text from prominent button
Browse files Browse the repository at this point in the history
fix brave/brave-browser#39072
fix brave/brave-browser#38905

We should not allow customizing text color for prominent button style
as we use our own bg color for it.
  • Loading branch information
simonhong committed Jun 21, 2024
1 parent 8b35b86 commit dc0a641
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chromium_src/ui/views/controls/button/md_text_button.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@ void MdTextButton::SetLoading(bool loading) {
void MdTextButton::UpdateTextColor() {
MdTextButtonBase::UpdateTextColor();

// Use explicitely set color instead of our default colors.
if (explicitly_set_normal_color()) {
// Use explicitely set color instead of our default colors except for
// prominent style. As we have specific bg color for prominent, need to use
// our text color for this style.
if (style_ != ui::ButtonStyle::kProminent && explicitly_set_normal_color()) {
return;
}

Expand Down

0 comments on commit dc0a641

Please sign in to comment.