From 1eeebb7f7143deaccac0b1ba23d87c42dae055cc Mon Sep 17 00:00:00 2001 From: eoineoineoin Date: Mon, 27 Oct 2025 20:24:19 +0000 Subject: [PATCH] Move Monotone button, checkbox styles out of StyleNano and into sheetlets (#41120) --- .../Stylesheets/CommonStylesheet.cs | 5 + .../SheetletConfigs/IButtonConfig.cs | 4 + .../Stylesheets/Sheetlets/LabelSheetlet.cs | 16 ++ .../Sheetlets/MonotoneButtonSheetlet.cs | 105 +++++++++++++ .../Sheetlets/MonotoneCheckBoxSheetlet.cs | 30 ++++ Content.Client/Stylesheets/StyleClass.cs | 3 + Content.Client/Stylesheets/StyleNano.cs | 139 ------------------ 7 files changed, 163 insertions(+), 139 deletions(-) create mode 100644 Content.Client/Stylesheets/Sheetlets/MonotoneButtonSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/MonotoneCheckBoxSheetlet.cs diff --git a/Content.Client/Stylesheets/CommonStylesheet.cs b/Content.Client/Stylesheets/CommonStylesheet.cs index d7634e68eb..f8eae88b38 100644 --- a/Content.Client/Stylesheets/CommonStylesheet.cs +++ b/Content.Client/Stylesheets/CommonStylesheet.cs @@ -65,6 +65,11 @@ public abstract class CommonStylesheet : PalettedStylesheet, IButtonConfig, IWin ResPath IButtonConfig.RoundedButtonPath => new("rounded_button.svg.96dpi.png"); ResPath IButtonConfig.RoundedButtonBorderedPath => new("rounded_button_bordered.svg.96dpi.png"); + ResPath IButtonConfig.MonotoneBaseButtonPath => new("Monotone/monotone_button.svg.96dpi.png"); + ResPath IButtonConfig.MonotoneOpenLeftButtonPath => new("Monotone/monotone_button_open_left.svg.96dpi.png"); + ResPath IButtonConfig.MonotoneOpenRightButtonPath => new("Monotone/monotone_button_open_right.svg.96dpi.png"); + ResPath IButtonConfig.MonotoneOpenBothButtonPath => new("Monotone/monotone_button_open_both.svg.96dpi.png"); + ColorPalette IButtonConfig.ButtonPalette => PrimaryPalette with { PressedElement = PositivePalette.PressedElement }; ColorPalette IButtonConfig.PositiveButtonPalette => PositivePalette; ColorPalette IButtonConfig.NegativeButtonPalette => NegativePalette; diff --git a/Content.Client/Stylesheets/SheetletConfigs/IButtonConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/IButtonConfig.cs index 3dc8f07ef8..01155c6e46 100644 --- a/Content.Client/Stylesheets/SheetletConfigs/IButtonConfig.cs +++ b/Content.Client/Stylesheets/SheetletConfigs/IButtonConfig.cs @@ -12,6 +12,10 @@ public interface IButtonConfig : ISheetletConfig public ResPath SmallButtonPath { get; } public ResPath RoundedButtonPath { get; } public ResPath RoundedButtonBorderedPath { get; } + public ResPath MonotoneBaseButtonPath { get; } + public ResPath MonotoneOpenLeftButtonPath { get; } + public ResPath MonotoneOpenRightButtonPath { get; } + public ResPath MonotoneOpenBothButtonPath { get; } public ColorPalette ButtonPalette { get; } public ColorPalette PositiveButtonPalette { get; } diff --git a/Content.Client/Stylesheets/Sheetlets/LabelSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/LabelSheetlet.cs index 9135b53555..77c554a9f3 100644 --- a/Content.Client/Stylesheets/Sheetlets/LabelSheetlet.cs +++ b/Content.Client/Stylesheets/Sheetlets/LabelSheetlet.cs @@ -1,3 +1,4 @@ +using Content.Client.Resources; using Content.Client.Stylesheets.Fonts; using Content.Client.Stylesheets.Palette; using Robust.Client.UserInterface; @@ -11,6 +12,10 @@ public sealed class LabelSheetlet : Sheetlet { public override StyleRule[] GetRules(PalettedStylesheet sheet, object config) { + var robotoMonoBold11 = ResCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 11); + var robotoMonoBold12 = ResCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 12); + var robotoMonoBold14 = ResCache.GetFont("/Fonts/RobotoMono/RobotoMono-Bold.ttf", size: 14); + return [ E