[AGS] Battery: Improve design
This commit is contained in:
parent
bec7474793
commit
acca70d47f
@ -11,27 +11,26 @@ export const BatteryBox = () => {
|
||||
<box
|
||||
cssClasses={["battery-info"]}
|
||||
visible={bind(battery, "isBattery")}
|
||||
child={
|
||||
<box cssClasses={["battery-box"]}>
|
||||
<image
|
||||
iconName={bind(battery, "batteryIconName")}
|
||||
tooltipText={bind(battery, "energyRate").as(er =>
|
||||
batteryEnergy(er),
|
||||
)}
|
||||
/>
|
||||
<label
|
||||
label={bind(battery, "percentage").as(
|
||||
p => ` ${Math.round(p * 100)}%`,
|
||||
)}
|
||||
/>
|
||||
<label
|
||||
cssClasses={["time"]}
|
||||
visible={bind(battery, "charging").as(c => !c)}
|
||||
label={bind(battery, "timeToEmpty").as(t => `(${toTime(t)})`)}
|
||||
/>
|
||||
</box>
|
||||
}
|
||||
></box>
|
||||
hexpand={false}
|
||||
vexpand={false}
|
||||
>
|
||||
<image
|
||||
iconName={bind(battery, "batteryIconName")}
|
||||
tooltipText={bind(battery, "energyRate").as(er =>
|
||||
batteryEnergy(er),
|
||||
)}
|
||||
/>
|
||||
<label
|
||||
label={bind(battery, "percentage").as(
|
||||
p => ` ${Math.round(p * 100)}%`,
|
||||
)}
|
||||
/>
|
||||
<label
|
||||
cssClasses={["time"]}
|
||||
visible={bind(battery, "charging").as(c => !c)}
|
||||
label={bind(battery, "timeToEmpty").as(t => `(${toTime(t)})`)}
|
||||
/>
|
||||
</box>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user