Move Monotone button, checkbox styles out of StyleNano and into sheetlets (#41120)

This commit is contained in:
eoineoineoin
2025-10-27 20:24:19 +00:00
committed by GitHub
parent 156ded022c
commit 1eeebb7f71
7 changed files with 163 additions and 139 deletions

View File

@@ -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<PalettedStylesheet>
{
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<Label>()
@@ -58,6 +63,17 @@ public sealed class LabelSheetlet : Sheetlet<PalettedStylesheet>
E<Label>()
.Class(StyleClass.StatusCritical)
.FontColor(Palettes.Status.Critical),
// Console text
E<Label>()
.Class(StyleClass.LabelMonospaceText)
.Prop(Label.StylePropertyFont, robotoMonoBold11),
E<Label>()
.Class(StyleClass.LabelMonospaceHeading)
.Prop(Label.StylePropertyFont, robotoMonoBold12),
E<Label>()
.Class(StyleClass.LabelMonospaceSubHeading)
.Prop(Label.StylePropertyFont, robotoMonoBold14),
];
}
}