From 893f4f14036b34505c47bff43f287a19ab4a4d67 Mon Sep 17 00:00:00 2001 From: opl- Date: Wed, 3 Sep 2025 22:49:50 +0200 Subject: [PATCH] Use a fixed amount of decimal points in gas analyzer window (#40081) This prevents the volume and temperature labels from changing width when the value lands on integer values, making the text easier to read. Co-authored-by: opl <4833621+opl@users.noreply.github.com> --- Content.Client/Atmos/UI/GasAnalyzerWindow.xaml.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Client/Atmos/UI/GasAnalyzerWindow.xaml.cs b/Content.Client/Atmos/UI/GasAnalyzerWindow.xaml.cs index e280523e43..63b4e6b0c6 100644 --- a/Content.Client/Atmos/UI/GasAnalyzerWindow.xaml.cs +++ b/Content.Client/Atmos/UI/GasAnalyzerWindow.xaml.cs @@ -208,7 +208,7 @@ namespace Content.Client.Atmos.UI }); presBox.AddChild(new Label { - Text = Loc.GetString("gas-analyzer-window-pressure-val-text", ("pressure", $"{gasMix.Pressure:0.##}")), + Text = Loc.GetString("gas-analyzer-window-pressure-val-text", ("pressure", $"{gasMix.Pressure:0.00}")), Align = Label.AlignMode.Right, HorizontalExpand = true }); @@ -232,8 +232,8 @@ namespace Content.Client.Atmos.UI tempBox.AddChild(new Label { Text = Loc.GetString("gas-analyzer-window-temperature-val-text", - ("tempK", $"{gasMix.Temperature:0.#}"), - ("tempC", $"{TemperatureHelpers.KelvinToCelsius(gasMix.Temperature):0.#}")), + ("tempK", $"{gasMix.Temperature:0.0}"), + ("tempC", $"{TemperatureHelpers.KelvinToCelsius(gasMix.Temperature):0.0}")), Align = Label.AlignMode.Right, HorizontalExpand = true }); -- 2.51.2