chore: migrate bar widgets to ags v3 and gtk4

This commit is contained in:
retrozinndev
2025-07-06 19:55:27 -03:00
parent 3b03c434b5
commit 7b758bd298
14 changed files with 569 additions and 631 deletions
+16
View File
@@ -0,0 +1,16 @@
import { Gtk } from "ags/gtk4";
import { Windows } from "../../windows";
import { createBinding } from "ags";
import { tr } from "../../i18n/intl";
export const Apps = () =>
<Gtk.Button class={createBinding(Windows.getDefault(), "openWindows").as((openWindows) =>
`apps ${Object.hasOwn(openWindows, "apps-window") ? "open" : ""}`
)} $={(self) => {
const conns: Array<number> = [
self.connect("clicked", (_) => Windows.getDefault().open("apps-window")),
self.connect("destroy", (_) => conns.forEach(id => self.disconnect(id)))
];
}} iconName={"applications-other-symbolic"} halign={Gtk.Align.CENTER}
hexpand={true} tooltipText={tr("apps")}
/>;