🔧 chore: use a different approach to compile stylesheets

also fixed promise calls not working(execAsync, subprocess), restored previous control center tile implementation temporarily
This commit is contained in:
retrozinndev
2025-08-12 14:30:47 -03:00
parent eb4b5a847f
commit 0191afef16
9 changed files with 179 additions and 482 deletions
+1 -2
View File
@@ -10,7 +10,6 @@ import GObject from "ags/gobject";
import AstalBluetooth from "gi://AstalBluetooth";
import AstalNetwork from "gi://AstalNetwork";
import AstalWp from "gi://AstalWp";
import { Shell } from "../../app";
export const Status = () =>
@@ -134,7 +133,7 @@ function StatusIcons() {
: "preferences-system-notifications-symbolic")
}
/>
<Gtk.Image gicon={Shell.getDefault().getGIcon("circle-filled-symbolic")} class={"notification-count"}
<Gtk.Image iconName={"circle-filled-symbolic"} class={"notification-count"}
visible={variableToBoolean(createBinding(Notifications.getDefault(), "history"))}
/>
</Gtk.Box>
+19 -2
View File
@@ -7,8 +7,24 @@ import GObject, { property, register, signal } from "ags/gobject";
import Pango from "gi://Pango?version=1.0";
export { Tile };
export { Tile, TileProps };
type TileProps = {
class?: string | Accessor<string>;
icon?: string | Accessor<string>;
visible?: boolean | Accessor<boolean>;
iconSize?: number | Accessor<number>;
title: string | Accessor<string>;
description?: string | Accessor<string>;
toggleState?: boolean | Accessor<boolean>;
enableOnClickMore?: boolean | Accessor<boolean>;
onUnmap?: () => void;
onToggledOn: () => void;
onToggledOff: () => void;
onClickMore?: () => void;
};
/* TODO: finish the tile class
@register({ GTypeName: "Tile" })
class Tile extends Gtk.Box {
@signal(Boolean) toggled(_state: boolean) {}
@@ -119,8 +135,9 @@ class Tile extends Gtk.Box {
return super.connect(signal, callback);
}
}
*/
export function TileFun(props: TileProps): Gtk.Widget {
function Tile(props: TileProps): Gtk.Widget {
const subs: Array<() => void> = [];
const [toggled, setToggled] = createState(((props.toggleState instanceof Accessor) ?
props.toggleState.get()