[AGS] Improve brightness controls

This commit is contained in:
Janis Hutz 2025-04-26 13:07:55 +02:00
parent d72c4fdf86
commit a7e6584f78
3 changed files with 26 additions and 23 deletions

View File

@ -11,7 +11,7 @@ export const BatteryBox = () => {
<box
cssClasses={["battery-info"]}
visible={bind(battery, "isBattery")}
>
child={
<box cssClasses={["battery-box"]}>
<image
iconName={bind(battery, "batteryIconName")}
@ -26,13 +26,12 @@ export const BatteryBox = () => {
/>
<label
cssClasses={["time"]}
hexpand={true}
halign={Gtk.Align.END}
visible={bind(battery, "charging").as(c => !c)}
label={bind(battery, "timeToEmpty").as(t => toTime(t))}
label={bind(battery, "timeToEmpty").as(t => `(${toTime(t)})`)}
/>
</box>
</box>
}
></box>
);
};

View File

@ -59,4 +59,8 @@ window.Bar {
padding: 0;
}
}
.quick-view-symbol {
margin: 3px;
}
}

View File

@ -20,7 +20,7 @@ export default class Brightness extends GObject.Object {
#kbd = get(`--device ${kbd} get`)
#screenMax = get("max")
#screen = get("get") / (get("max") || 1)
#screenAvailable = false
#screenAvailable = true
@property(Boolean)
get screenAvailable() { return this.#screenAvailable }