Skip to content

Commit

Permalink
Remove patch
Browse files Browse the repository at this point in the history
  • Loading branch information
fallaciousreasoning committed Dec 12, 2022
1 parent 683742c commit ce3074d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
8 changes: 4 additions & 4 deletions chromium_src/ui/views/controls/button/md_text_button.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/view_class_properties.h"

// To be called from MdTextButtonBase::UpdateColors().
#define BRAVE_MD_TEXT_BUTTON_UPDATE_COLORS UpdateIconForBrave();

#define MdTextButton MdTextButtonBase
#include "src/ui/views/controls/button/md_text_button.cc"
#undef MdTextButton
Expand Down Expand Up @@ -271,7 +268,10 @@ void MdTextButton::UpdateBackgroundColor() {
colors.background_color, colors.stroke_color, GetCornerRadius())));
}

void MdTextButton::UpdateIconForBrave() {
void MdTextButton::UpdateColors() {
MdTextButtonBase::UpdateColors();

// Update the icon color.
if (icon_) {
SetImageModel(
ButtonState::STATE_NORMAL,
Expand Down
14 changes: 8 additions & 6 deletions chromium_src/ui/views/controls/button/md_text_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@
#define MdTextButton MdTextButtonBase

// Redefine UpdateTextColor as protected virtual so we can override it.
#define UpdateTextColor \
UpdateTextColor_Unused(); \
\
protected: \
virtual void UpdateIconForBrave() = 0; \
#define UpdateTextColor \
UpdateTextColor_Unused(); \
\
protected: \
virtual void UpdateTextColor

#define UpdateColors virtual UpdateColors

#include "src/ui/views/controls/button/md_text_button.h"

#undef UpdateColors
#undef UpdateTextColor
#undef MdTextButton

Expand Down Expand Up @@ -63,7 +65,7 @@ class VIEWS_EXPORT MdTextButton : public MdTextButtonBase {
// MdTextButtonBase:
void UpdateTextColor() override;
void UpdateBackgroundColor() override;
void UpdateIconForBrave() override;
void UpdateColors() override;

protected:
// views::Views
Expand Down
12 changes: 0 additions & 12 deletions patches/ui-views-controls-button-md_text_button.cc.patch

This file was deleted.

0 comments on commit ce3074d

Please sign in to comment.