feat: update system

This commit is contained in:
2024-02-07 14:25:34 +01:00
parent 3bfeb8e6fc
commit 09afd0bef6
67 changed files with 933 additions and 1347 deletions

View File

@@ -7,11 +7,13 @@ const Padding = (windowName) =>
class_name: "padding",
hexpand: true,
vexpand: true,
connections: [["button-press-event", () => App.toggleWindow(windowName)]],
setup: (w) =>
w.on("button-press-event", () => App.toggleWindow(windowName)),
});
/**
* @param {import('types/widgets/window').WindowProps & {
* @template {import('gi://Gtk?version=3.0').default.Widget} T
* @param {import('types/widgets/window').WindowProps<T> & {
* name: string
* child: import('types/widgets/box').default
* }} o
@@ -23,20 +25,20 @@ export default ({ name, child, ...rest }) =>
name,
visible: false,
popup: true,
focusable: true,
keymode: "on-demand",
setup() {
child.toggleClassName("window-content");
},
child: Widget.CenterBox({
class_name: "shader",
css: "min-width: 5000px; min-height: 3000px;",
children: [
Padding(name),
Widget.CenterBox({
vertical: true,
children: [Padding(name), child, Padding(name)],
}),
Padding(name),
],
start_widget: Padding(name),
end_widget: Padding(name),
center_widget: Widget.CenterBox({
vertical: true,
start_widget: Padding(name),
end_widget: Padding(name),
center_widget: child,
}),
}),
});

View File

@@ -17,7 +17,7 @@ export default () =>
children: [
Widget.Label({
class_name: "title",
binds: [["label", PowerMenu, "title"]],
label: PowerMenu.bind("title"),
}),
Widget.Label({
class_name: "desc",