From 020112bf992ac1d868e71cfcfb1a69da80be628e Mon Sep 17 00:00:00 2001 From: AndrewFenriz <78079974+AndrewFenriz@users.noreply.github.com> Date: Sat, 19 Sep 2026 18:11:23 +0000 Subject: [PATCH] Migrate legacy UI colors and fix green button styling (#45889) * migrate * update ReplayLoadingFailedControl * remove BOM --- .../Consoles/AtmosAlarmEntryContainer.xaml.cs | 15 ++++++++------- .../Consoles/AtmosAlertsComputerWindow.xaml.cs | 6 +++--- .../AtmosMonitoringEntryContainer.xaml.cs | 14 +++++++------- Content.Client/Holopad/HolopadWindow.xaml.cs | 2 +- .../NetworkConfiguratorLinkMenu.xaml | 3 +-- Content.Client/Power/Battery/BatteryMenu.xaml.cs | 6 +++--- .../UI/Loading/ReplayLoadingFailedControl.xaml.cs | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs b/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs index e192a66fcc..5e8c97380c 100644 --- a/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs +++ b/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs @@ -1,4 +1,5 @@ using Content.Client.Stylesheets; +using Content.Client.Stylesheets.Palette; using Content.Shared.Atmos; using Content.Shared.Atmos.Components; using Content.Shared.Atmos.EntitySystems; @@ -135,7 +136,7 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer { Text = Loc.GetString("atmos-alerts-window-other-gases-value-nil"), FontOverride = normalFont, - FontColorOverride = StyleNano.DisabledFore, + FontColorOverride = Palettes.Neutral.Base, HorizontalAlignment = HAlignment.Center, VerticalAlignment = VAlignment.Center, HorizontalExpand = true, @@ -175,13 +176,13 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer public void SetAsFocus() { - FocusButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen); + FocusButton.AddStyleClass(StyleClass.Positive); ArrowTexture.TexturePath = "/Textures/Interface/Nano/inverted_triangle.svg.png"; } public void RemoveAsFocus() { - FocusButton.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen); + FocusButton.RemoveStyleClass(StyleClass.Positive); ArrowTexture.TexturePath = "/Textures/Interface/Nano/triangle_right.png"; FocusContainer.Visible = false; } @@ -191,13 +192,13 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer switch (alarmType) { case AtmosAlarmType.Normal: - return StyleNano.GoodGreenFore; + return Palettes.Status.Good; case AtmosAlarmType.Warning: - return StyleNano.ConcerningOrangeFore; + return Palettes.Status.Warning; case AtmosAlarmType.Danger: - return StyleNano.DangerousRedFore; + return Palettes.Status.Critical; } - return StyleNano.DisabledFore; + return Palettes.Neutral.Base; } } diff --git a/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs b/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs index 1268433cab..743da68e34 100644 --- a/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs +++ b/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs @@ -1,6 +1,6 @@ using Content.Client.Message; using Content.Client.Pinpointer.UI; -using Content.Client.Stylesheets; +using Content.Client.Stylesheets.Palette; using Content.Client.UserInterface.Controls; using Content.Shared.Atmos.Components; using Content.Shared.Atmos.Monitor; @@ -49,8 +49,8 @@ public sealed partial class AtmosAlertsComputerWindow : FancyWindow private Color _monitorBlipColor = Color.Cyan; private Color _untrackedEntColor = Color.DimGray; private Color _regionBaseColor = new Color(154, 154, 154); - private Color _inactiveColor = StyleNano.DisabledFore; - private Color _statusTextColor = StyleNano.GoodGreenFore; + private Color _inactiveColor = Palettes.Neutral.Base; + private Color _statusTextColor = Palettes.Status.Good; private Color _goodColor = Color.LimeGreen; private Color _warningColor = new Color(255, 182, 72); private Color _dangerColor = new Color(255, 67, 67); diff --git a/Content.Client/Atmos/Consoles/AtmosMonitoringEntryContainer.xaml.cs b/Content.Client/Atmos/Consoles/AtmosMonitoringEntryContainer.xaml.cs index cf9a89d1a5..789913e172 100644 --- a/Content.Client/Atmos/Consoles/AtmosMonitoringEntryContainer.xaml.cs +++ b/Content.Client/Atmos/Consoles/AtmosMonitoringEntryContainer.xaml.cs @@ -1,5 +1,5 @@ using Content.Client.Stylesheets; -using Content.Shared.Atmos; +using Content.Client.Stylesheets.Palette; using Content.Shared.Atmos.Components; using Content.Shared.Atmos.EntitySystems; using Content.Shared.FixedPoint; @@ -96,15 +96,15 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer Loc.GetString("atmos-alerts-window-temperature-value", ("valueInC", tempC), ("valueInK", tempK)) : Loc.GetString("atmos-alerts-window-invalid-value"); - TemperatureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore; + TemperatureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base; // Update pressure PressureLabel.Text = Loc.GetString("atmos-alerts-window-pressure-value", ("value", (FixedPoint2)updatedData.PressureData)); - PressureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore; + PressureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base; // Update total mol TotalMolLabel.Text = Loc.GetString("atmos-alerts-window-total-mol-value", ("value", (FixedPoint2)updatedData.TotalMolData)); - TotalMolLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore; + TotalMolLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base; // Update other present gases GasGridContainer.RemoveAllChildren(); @@ -116,7 +116,7 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer { Text = Loc.GetString("atmos-alerts-window-other-gases-value-nil"), FontOverride = normalFont, - FontColorOverride = StyleNano.DisabledFore, + FontColorOverride = Palettes.Neutral.Base, HorizontalAlignment = HAlignment.Center, VerticalAlignment = VAlignment.Center, HorizontalExpand = true, @@ -155,14 +155,14 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer public void SetAsFocus() { - FocusButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen); + FocusButton.AddStyleClass(StyleClass.Positive); ArrowTexture.TexturePath = "/Textures/Interface/Nano/inverted_triangle.svg.png"; FocusContainer.Visible = true; } public void RemoveAsFocus() { - FocusButton.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen); + FocusButton.RemoveStyleClass(StyleClass.Positive); ArrowTexture.TexturePath = "/Textures/Interface/Nano/triangle_right.png"; FocusContainer.Visible = false; } diff --git a/Content.Client/Holopad/HolopadWindow.xaml.cs b/Content.Client/Holopad/HolopadWindow.xaml.cs index efca274ccb..00367592d5 100644 --- a/Content.Client/Holopad/HolopadWindow.xaml.cs +++ b/Content.Client/Holopad/HolopadWindow.xaml.cs @@ -61,7 +61,7 @@ public sealed partial class HolopadWindow : FancyWindow RequestStationAiButton.OnPressed += args => { OnHolopadRequestStationAiMessage(); }; // XML formatting - AnswerCallButton.AddStyleClass("ButtonAccept"); + AnswerCallButton.AddStyleClass(StyleClass.Positive); EndCallButton.AddStyleClass(StyleClass.Negative); StartBroadcastButton.AddStyleClass(StyleClass.Negative); diff --git a/Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml b/Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml index a512e694f6..8c0f9403db 100644 --- a/Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml +++ b/Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml @@ -1,6 +1,5 @@ @@ -29,7 +28,7 @@ - + diff --git a/Content.Client/Power/Battery/BatteryMenu.xaml.cs b/Content.Client/Power/Battery/BatteryMenu.xaml.cs index df3f15632f..b82adac7f6 100644 --- a/Content.Client/Power/Battery/BatteryMenu.xaml.cs +++ b/Content.Client/Power/Battery/BatteryMenu.xaml.cs @@ -1,5 +1,5 @@ using System.Diagnostics.CodeAnalysis; -using Content.Client.Stylesheets; +using Content.Client.Stylesheets.Palette; using Content.Client.UserInterface.Controls; using Content.Shared.Power; using Content.Shared.Rounding; @@ -29,10 +29,10 @@ public sealed partial class BatteryMenu : FancyWindow // Colors used for the storage cell bar graphic. private static readonly Color[] StorageColors = [ - StyleNano.DangerousRedFore, + Palettes.Status.Critical, Color.FromHex("#C49438"), Color.FromHex("#B3BF28"), - StyleNano.GoodGreenFore, + Palettes.Status.Good ]; // StorageColors but dimmed for "off" bars. diff --git a/Content.Client/Replay/UI/Loading/ReplayLoadingFailedControl.xaml.cs b/Content.Client/Replay/UI/Loading/ReplayLoadingFailedControl.xaml.cs index 4f74a7313f..65f2db8241 100644 --- a/Content.Client/Replay/UI/Loading/ReplayLoadingFailedControl.xaml.cs +++ b/Content.Client/Replay/UI/Loading/ReplayLoadingFailedControl.xaml.cs @@ -14,7 +14,7 @@ public sealed partial class ReplayLoadingFailedControl : Control { RobustXamlLoader.Load(this); - Stylesheet = stylesheet.SheetSpace; + Stylesheet = stylesheet.SheetSystem; LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide); }