mirror of
https://github.com/zoriya/astal.git
synced 2026-06-01 09:45:31 +00:00
example: use gicon for tray
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user