summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-09-08 12:17:43 +0200
committerGitHub <[email protected]>2024-09-08 12:17:43 +0200
commit6fc8883ed63a3d6eb9fefc92c4991b0de45eb4ae (patch)
treea6485c12d40f94d6c56f592f38cd1759483d5f36
parent8e44219b0ea108a4b33cbd1e5ea06dfb1c06f659 (diff)
parent6686c4dca7d511e6d8062a788f11947a1c6b2c53 (diff)
Merge pull request #4 from Aylur/fix/example_bar
example: use gicon for tray
-rw-r--r--examples/js/simple-bar/widget/Bar.tsx15
1 files changed, 1 insertions, 14 deletions
diff --git a/examples/js/simple-bar/widget/Bar.tsx b/examples/js/simple-bar/widget/Bar.tsx
index d1bf2ec..d669fd5 100644
--- a/examples/js/simple-bar/widget/Bar.tsx
+++ b/examples/js/simple-bar/widget/Bar.tsx
@@ -22,20 +22,7 @@ function SysTray() {
onClickRelease={self => {
menu?.popup_at_widget(self, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null)
}}>
- <icon
- setup={self => {
- if (item.iconName) self.icon = item.iconName
- if (item.iconPixbuf) self.pixbuf = item.iconPixbuf
-
- self.hook(item, "notify::icon-name", () => {
- self.icon = item.iconName
- })
-
- self.hook(item, "notify::icon-pixbuf", () => {
- self.pixbuf = item.iconPixbuf
- })
- }}
- />
+ <icon g_icon={bind(item, "gicon")}/>
</button>
}))}
</box>