diff --git a/usr/lib/hypnotix/hypnotix.py b/usr/lib/hypnotix/hypnotix.py index 54c2566..76af321 100755 --- a/usr/lib/hypnotix/hypnotix.py +++ b/usr/lib/hypnotix/hypnotix.py @@ -266,6 +266,7 @@ def __init__(self, application): "layout_properties_box", "layout_properties_label", "favorite_button", + "favorite_button_image", "new_channel_button", "new_name_entry", "new_url_entry", @@ -878,6 +879,7 @@ def on_favorite_button_toggled(self, widget): elif widget.get_active() == False and data in self.favorite_data: print (f"Removing {name} from favorites") self.favorite_data.remove(data) + self.favorite_button_image.set_from_icon_name("starred-symbolic" if widget.get_active() else "non-starred-symbolic", Gtk.IconSize.BUTTON) self.manager.save_favorites(self.favorite_data) def on_channel_activated(self, box, widget): @@ -930,9 +932,11 @@ def before_play(self, channel): data = f"{channel.info}:::{channel.url}" if data in self.favorite_data: self.favorite_button.set_active(True) + self.favorite_button_image.set_from_icon_name("starred-symbolic", Gtk.IconSize.BUTTON) self.favorite_button.set_tooltip_text(_("Remove from favorites")) else: self.favorite_button.set_active(False) + self.favorite_button_image.set_from_icon_name("non-starred-symbolic", Gtk.IconSize.BUTTON) self.favorite_button.set_tooltip_text(_("Add to favorites")) self.page_is_loading = False diff --git a/usr/share/hypnotix/hypnotix.ui b/usr/share/hypnotix/hypnotix.ui index f70a759..0308f1b 100644 --- a/usr/share/hypnotix/hypnotix.ui +++ b/usr/share/hypnotix/hypnotix.ui @@ -120,7 +120,7 @@ True False - xapp-favorites-app-symbolic + starred-symbolic 3 @@ -517,10 +517,10 @@ True True - + True False - xapp-favorites-app-symbolic + starred-symbolic