Widen power monitoring widget (#29062)

(cherry picked from commit e633fe801bb4755aa6015612b432571b687ce6ca)
This commit is contained in:
Partmedia
2024-06-16 04:06:54 +03:00
committed by Spatison
parent f88d485635
commit cd285acffc

View File

@@ -102,6 +102,7 @@ public sealed partial class PowerMonitoringWindow
// Update tool tip
button.ToolTip = Loc.GetString(name);
// Update power value
// Don't use SI prefixes, just give the number in W, so that it is readily apparent which consumer is using a lot of power.
button.PowerValue.Text = Loc.GetString("power-monitoring-window-button-value", ("value", Math.Round(entry.PowerValue).ToString("N0")));
@@ -500,7 +501,7 @@ public sealed class PowerMonitoringButton : Button
};
MainContainer.AddChild(NameLocalized);
BatteryLevel = new ProgressBar()
{
SetWidth = 47f,
@@ -547,7 +548,8 @@ public sealed class PowerMonitoringButton : Button
PowerValue = new Label()
{
HorizontalAlignment = HAlignment.Right,
SetWidth = 72f,
Align = Label.AlignMode.Right,
SetWidth = 80f,
Margin = new Thickness(10, 0, 0, 0),
ClipText = true,
};