Skip to content

Commit

Permalink
Correct the icon colour for danger and warning buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Feb 8, 2023
1 parent b51e799 commit b78b038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions widget/button.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ func (r *buttonRenderer) applyTheme() {
if r.icon != nil && r.icon.Resource != nil {
switch res := r.icon.Resource.(type) {
case *theme.ThemedResource:
if r.button.Importance == HighImportance {
if r.button.Importance == HighImportance || r.button.Importance == DangerImportance || r.button.Importance == WarningImportance {
r.icon.Resource = theme.NewInvertedThemedResource(res)
r.icon.Refresh()
}
case *theme.InvertedThemedResource:
if r.button.Importance != HighImportance {
if r.button.Importance != HighImportance && r.button.Importance != DangerImportance && r.button.Importance != WarningImportance {
r.icon.Resource = res.Original()
r.icon.Refresh()
}
Expand Down

0 comments on commit b78b038

Please sign in to comment.