summaryrefslogtreecommitdiff
path: root/examples/js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/js')
-rw-r--r--examples/js/simple-bar/widget/Bar.tsx17
1 files changed, 6 insertions, 11 deletions
diff --git a/examples/js/simple-bar/widget/Bar.tsx b/examples/js/simple-bar/widget/Bar.tsx
index efc065a..029aca1 100644
--- a/examples/js/simple-bar/widget/Bar.tsx
+++ b/examples/js/simple-bar/widget/Bar.tsx
@@ -13,19 +13,14 @@ function SysTray() {
return <box>
{bind(tray, "items").as(items => items.map(item => {
- if (item.iconThemePath)
- App.add_icons(item.iconThemePath)
-
- const menu = item.create_menu()
-
- return <button
+
+ return <menubutton
tooltipMarkup={bind(item, "tooltipMarkup")}
- onDestroy={() => menu?.destroy()}
- onClickRelease={self => {
- menu?.popup_at_widget(self, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null)
- }}>
+ usePopover={false}
+ actionGroup={bind(item, "action-group").as(ag => { return { prefix: "dbusmenu", actionGroup: ag}})}
+ menuModel={bind(item, "menu-model")} >
<icon gIcon={bind(item, "gicon")} />
- </button>
+ </menubutton>
}))}
</box>
}