💥 fix: correctly use centerbox with gtkbuilder types, fix styles

also re-added some windows to the windows list(they were causing issues before)
This commit is contained in:
retrozinndev
2025-07-07 21:58:34 -03:00
parent 246698c642
commit 2fb3b68204
15 changed files with 144 additions and 199 deletions
+12 -14
View File
@@ -10,32 +10,30 @@ import { Status } from "../widget/bar/Status";
export const Bar = (mon: number) => {
const widgetSpacing = 4;
return <Astal.Window
namespace={"top-bar"}
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT | Astal.WindowAnchor.RIGHT}
layer={Astal.Layer.TOP}
exclusivity={Astal.Exclusivity.EXCLUSIVE}
heightRequest={46}
monitor={mon}
visible={true}
canFocus={false}>
<Gtk.Box class={"bar-container"}>
<Gtk.CenterBox class={"bar-centerbox"}>
return <Astal.Window namespace={"top-bar"} layer={Astal.Layer.TOP}
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT | Astal.WindowAnchor.RIGHT}
exclusivity={Astal.Exclusivity.EXCLUSIVE} heightRequest={46} monitor={mon}
visible={true} canFocus={false}>
<Gtk.Box class={"bar-container"}>
<Gtk.CenterBox class={"bar-centerbox"} hexpand>
<Gtk.Box class={"widgets-left"} homogeneous={false}
halign={Gtk.Align.START} spacing={widgetSpacing}>
halign={Gtk.Align.START} spacing={widgetSpacing}
$type="start">
<Apps />
<Workspaces />
<FocusedClient />
</Gtk.Box>
<Gtk.Box class={"widgets-center"} homogeneous={false}
spacing={widgetSpacing} halign={Gtk.Align.CENTER}>
spacing={widgetSpacing} halign={Gtk.Align.CENTER}
$type="center">
<Clock />
<Media />
</Gtk.Box>
<Gtk.Box class={"widgets-right"} homogeneous={false}
spacing={widgetSpacing} halign={Gtk.Align.END}>
spacing={widgetSpacing} halign={Gtk.Align.END}
$type="end">
<Tray />
<Status />
</Gtk.Box>
+3 -8
View File
@@ -1,9 +1,7 @@
import { Astal, Gtk } from "ags/gtk4";
import { QuickActions } from "../widget/control-center/QuickActions";
import { Tiles } from "../widget/control-center/Tiles";
import { Sliders } from "../widget/control-center/Sliders";
import { NotifHistory } from "../widget/control-center/NotifHistory";
import { PopupWindow } from "../widget/PopupWindow";
import { NotifHistory } from "../widget/control-center/NotifHistory";
import { QuickActions } from "../widget/control-center/QuickActions";
export const ControlCenter = (mon: number) =>
@@ -12,17 +10,14 @@ export const ControlCenter = (mon: number) =>
marginTop={10} marginRight={10} marginBottom={10} monitor={mon}
widthRequest={395}>
<Gtk.Box orientation={Gtk.Orientation.VERTICAL}
<Gtk.Box orientation={Gtk.Orientation.VERTICAL}
spacing={16}>
<Gtk.Box class={"control-center-container"}
orientation={Gtk.Orientation.VERTICAL} vexpand={false}>
<QuickActions />
<Sliders />
<Tiles />
</Gtk.Box>
<NotifHistory />
</Gtk.Box>
</PopupWindow> as Astal.Window;