Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tray pixmaps #186

Merged
merged 2 commits into from
Mar 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions nwg_panel/modules/sni_system_tray/tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ def add_item(self, item: StatusNotifierItem):
event_box = Gtk.EventBox()
image = Gtk.Image()

if "IconPixmap" in item.properties:
update_icon_from_pixmap(image, item, self.icon_size)
elif "IconName" in item.properties:
if "IconName" in item.properties:
update_icon(image, item, self.icon_size, self.icons_path)
elif "IconPixmap" in item.properties and len(item.properties["IconPixmap"]) != 0:
update_icon_from_pixmap(image, item, self.icon_size)

if "Tooltip" in item.properties:
update_tooltip(image, item)
Expand Down Expand Up @@ -177,11 +177,11 @@ def update_item(self, item: StatusNotifierItem, changed_properties: list[str]):
event_box = self.items[full_service_name]["event_box"]
image = self.items[full_service_name]["image"]

if "IconPixmap" in changed_properties:
if "IconThemePath" in changed_properties or "IconName" in changed_properties:
update_icon(image, item, self.icon_size, self.icons_path)
elif "IconPixmap" in changed_properties and len(item.properties["IconPixmap"]) != 0:
update_icon_from_pixmap(image, item, self.icon_size)
pass
elif "IconThemePath" in changed_properties or "IconName" in changed_properties:
update_icon(image, item, self.icon_size, self.icons_path)

if "Tooltip" in changed_properties:
update_tooltip(image, item)
Expand Down