summaryrefslogtreecommitdiff
path: root/examples/js
diff options
context:
space:
mode:
authorkotontrion <[email protected]>2024-09-08 11:19:09 +0200
committerkotontrion <[email protected]>2024-09-08 11:19:09 +0200
commit6686c4dca7d511e6d8062a788f11947a1c6b2c53 (patch)
treea6485c12d40f94d6c56f592f38cd1759483d5f36 /examples/js
parent8e44219b0ea108a4b33cbd1e5ea06dfb1c06f659 (diff)
example: use gicon for tray
Diffstat (limited to 'examples/js')
-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>