Skip to content

Commit

Permalink
fix: adding icon hint without color hint shows wrong icon color
Browse files Browse the repository at this point in the history
  • Loading branch information
codelif committed Apr 4, 2024
1 parent 98a706d commit 9135d06
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/dbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ func parse_hints(nf *Notification, hints map[string]dbus.Variant) {
if ok {
nf.font_size.value = font_size
}

hint_icon, ok := hints["x-hyprnotify-icon"].Value().(int32)
if ok {
nf.icon.value = hint_icon
nf.icon.padding = ""
nf.color.value = nf.color.DEFAULT
}

hint_color, ok := hints["x-hyprnotify-color"].Value().(string)
if ok {
Expand All @@ -177,11 +184,6 @@ func parse_hints(nf *Notification, hints map[string]dbus.Variant) {
}
}

hint_icon, ok := hints["x-hyprnotify-icon"].Value().(int32)
if ok {
nf.icon.value = hint_icon
nf.icon.padding = ""
}

}

Expand Down

0 comments on commit 9135d06

Please sign in to comment.