fix(ags): fix breaking changes for tray
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
2743ac1001
commit
a393d11e1c
1 changed files with 10 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { App, Gdk, Gtk, Widget } from 'astal/gtk3';
|
import { App, Gtk, Widget } from 'astal/gtk3';
|
||||||
import { bind, idle } from 'astal';
|
import { bind, idle } from 'astal';
|
||||||
|
|
||||||
import AstalTray from 'gi://AstalTray';
|
import AstalTray from 'gi://AstalTray';
|
||||||
|
@ -11,24 +11,25 @@ const TrayItem = (item: AstalTray.TrayItem) => {
|
||||||
App.add_icons(item.iconThemePath);
|
App.add_icons(item.iconThemePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
const menu = item.create_menu();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<revealer
|
<revealer
|
||||||
transitionType={Gtk.RevealerTransitionType.SLIDE_RIGHT}
|
transitionType={Gtk.RevealerTransitionType.SLIDE_RIGHT}
|
||||||
revealChild={false}
|
revealChild={false}
|
||||||
>
|
>
|
||||||
<button
|
<menubutton
|
||||||
className="tray-item"
|
className="tray-item"
|
||||||
cursor="pointer"
|
cursor="pointer"
|
||||||
|
|
||||||
|
usePopover={false}
|
||||||
|
// @ts-expect-error types are wrong
|
||||||
tooltipMarkup={bind(item, 'tooltipMarkup')}
|
tooltipMarkup={bind(item, 'tooltipMarkup')}
|
||||||
onDestroy={() => menu?.destroy()}
|
// @ts-expect-error types are wrong
|
||||||
onClickRelease={(self) => {
|
actionGroup={bind(item, 'actionGroup').as((ag) => ['dbusmenu', ag])}
|
||||||
menu?.popup_at_widget(self, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null);
|
// @ts-expect-error types are wrong
|
||||||
}}
|
menuModel={bind(item, 'menuModel')}
|
||||||
>
|
>
|
||||||
<icon gIcon={bind(item, 'gicon')} />
|
<icon gIcon={bind(item, 'gicon')} />
|
||||||
</button>
|
</menubutton>
|
||||||
</revealer>
|
</revealer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue