[AGS] Battery, Brightness: Improve design
This commit is contained in:
parent
678afa99d6
commit
86e963e408
@ -1,6 +1,5 @@
|
||||
import { bind } from "astal";
|
||||
import Battery from "gi://AstalBattery";
|
||||
import { Gtk } from "astal/gtk4";
|
||||
|
||||
export const BatteryBox = () => {
|
||||
const battery = Battery.get_default();
|
||||
@ -26,10 +25,15 @@ export const BatteryBox = () => {
|
||||
)}
|
||||
/>
|
||||
<label
|
||||
cssClasses={["time"]}
|
||||
cssClasses={["battery-time"]}
|
||||
visible={bind(battery, "charging").as(c => !c)}
|
||||
label={bind(battery, "timeToEmpty").as(t => `(${toTime(t)})`)}
|
||||
/>
|
||||
<label
|
||||
cssClasses={["battery-time"]}
|
||||
visible={bind(battery, "charging")}
|
||||
label={bind(battery, "timeToFull").as(t => `(${toTime(t)})`)}
|
||||
/>
|
||||
</box>
|
||||
);
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ const BrightnessModule = () => {
|
||||
<image iconName={"brightness-high-symbolic"}></image>
|
||||
<label label={bind(brightness, "screen").as(b => `${Math.round(100 * b)}%`)}></label>
|
||||
<slider
|
||||
value={bind(brightness, "screen").as(b => Math.round(100 * b))}
|
||||
value={bind(brightness, "screen").as(b => 100 * b)}
|
||||
hexpand
|
||||
max={100}
|
||||
min={0}
|
||||
|
Loading…
x
Reference in New Issue
Block a user