Added power and settings button

This commit is contained in:
Pascal Thuma committed 2026-03-24 20:04:35 +01:00
1 parent 8954e05d39
commit 61d1c72c07
3 files changed
+55 -1

No files matched your search

+15
View File
@@ -73,4 +73,19 @@ window.Bar {
}
}
}
.controls-container {
.control-btn {
padding: 2px 8px;
min-height: 24px;
image {
-gtk-icon-size: 16px;
}
}
.power-btn {
color: #ff5555; // Distinctive color for power button
}
}
}
+8 -1
View File
@@ -3,6 +3,7 @@ import { Astal, Gtk, Gdk } from "ags/gtk4"
import Workspaces from "./Workspaces"
import { Clock, SysTray } from "./System"
import Media from "./Media"
import Controls from "./Controls"
function Left() {
return (
@@ -28,8 +29,14 @@ function Center() {
function Right() {
return (
<box $type="end" halign={Gtk.Align.END} cssClasses={["right-box"]}>
<box
$type="end"
halign={Gtk.Align.END}
cssClasses={["right-box"]}
spacing={8}
>
<SysTray />
<Controls />
</box>
)
}
+32
View File
@@ -0,0 +1,32 @@
import { Gtk } from "ags/gtk4"
export function SettingsButton() {
return (
<button
cssClasses={["control-btn", "settings-btn"]}
onClicked={() => console.log("Open Settings Menu - Phase 8")}
>
<image iconName="emblem-system-symbolic" />
</button>
)
}
export function PowerButton() {
return (
<button
cssClasses={["control-btn", "power-btn"]}
onClicked={() => console.log("Open Power Menu - Phase 7")}
>
<image iconName="system-shutdown-symbolic" />
</button>
)
}
export default function Controls() {
return (
<box cssClasses={["controls-container"]} spacing={4} valign={Gtk.Align.CENTER}>
<SettingsButton />
<PowerButton />
</box>
)
}