]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
`StyleNano` removal: Palette system and Sheetlets (#29903)
authorBrandon Li <48413902+aspiringLich@users.noreply.github.com>
Sun, 19 Oct 2025 21:10:44 +0000 (17:10 -0400)
committerGitHub <noreply@github.com>
Sun, 19 Oct 2025 21:10:44 +0000 (21:10 +0000)
* Apply patch https://github.com/moonheart08/space-station-14/compare/1777eea9a42a8bdbc4a865327bb9ef3e10fe57de..6b32bb2b148ef9d312b5332ccea4d8688694dba5

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* make red squiggly line go away

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Add todo list

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Add palette to `TextureButton`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Rename `PalettedButtonSheetlet` to `NTButtonSheetlet` and move useful methods to `ButtonSheetlet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* migrate `ContextMenu` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* tweak NT colors

* New stylesheet: `InterfaceStylesheet` & `InterfaceTooltipSheetlet`

* Move inheritance of `IButtonConfig` to `NanotransenStylesheet.Buttons`

* move `MenuButtonSheetlet` & actually implement `InterfaceStylesheet` correctly

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* tweak color & update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* chat is this real (update chat palette)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Update todo

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `SmallButton` and remove some obsolete things from `StyleNano`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* rename `StyleClasses` to `StyleClass` so `Stylesheets.Redux.StyleClasses` syntax is dead

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* replace `ButtonColorGreen` with `Positive`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `Placeholder`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Examine popup buttons

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* move over more things & cleanup `StyleNano` more (under 1000 lines!!!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Remove some more redundant stuff

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Undo style change for chat window

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* paper editing works now

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `OptionButton` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `ListContainer`, move `DefaultWindow` styles (for now) & more cleanup

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* fix `ActionButton` not having highlighting

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* remove imports of `Robust.Client.UserInterface.StylesheetHelpers` & format

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `ButtonBig` and more cleanup

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Move items inheriting from `ISheetletConfig` into their own directory

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Cleanup & move `Label` styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Action search box styles

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Moved, stuff is

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* rename `LabelSubtext` to `LabelSubText` & move more stuff (were almost there!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* yap & move over MORE stuff (just like one thing left!!!)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Change status classes to appropriate existing classes

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* remove remaining references to `StyleNano`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Fix some hardcoding & broken code, `GetFromControl`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Scrollbars!

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* chores

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* clean up `StyleClass.cs`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `ItemListSheetlet` refactor

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* more chores!

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Consistency w/ directory structure

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Move `MainMenuSheetlet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `ColorPalette`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* whoopsie

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Remove most sheet-specific sheetlets

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* fix warnings, cleanup, & fix scrollbar (this is why we fix warnings boys)

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* yap

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* MASSIVE resharper skill issue

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* actually use `ISheetletConfig`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* have specific sheetlet be specific

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `GetResourceOr`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* cleanup & move / remove `IPalette`s

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* actually do specific stylesheets correctly & fix tooltips

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* cleanup & logging

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* Move `FontKind` and `FontKindExtensions` to their own files

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* rename `InterfaceStylesheet` to `SystemStylesheet`

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* change `ButtonHovered` etc to `PseudoHovered` etc

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* give the palettes fun names

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* `StyleSpace` is no more

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* It should compile now! I am now going to bed (fr) if it fails it fails

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* make squiggly red line go away

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
* add additional type restrictions to sheetlets

* `CommonStylesheet`

* minor cleanup

* Make `GetSheetletRules` not horrible

* wait this was duplicating style rules. oops!

* move some sheetlets to their associated xamls

* oh wait apparently that was important

* review pass 1

* review pass 2 (font & color stuff)

* review pass 3: remove unused stuff / filename fix

* fix warnings & "replace cast with explicit variable type"

* move `Palette` stuff to its own directory

* tweak colors (they're different now that I actually fixed the OKlab thing)

* review pass 4: little things

* make window close button grey before hovering

* refactor `HLine` to make it less terrible and allow it to be styled

* fix `NanoHeading` (it's been broken for a while whoops) and cleanup hardcoding

* band-aid missing references in `StyleNano`

* move `StyleBox` generating functions out of `IButtonSheetlet` into `StyleBoxHelper`

* remove dictionary field from `IStylesheetManager`

* Add check for unloaded sheetlets

* style tweaks to satisfy OCD

* I somehow missed this: `Caution` styleclass replaced with `negative`, refactor `PowerChargeWindow`

* tweak palettes for like the fourth time

* construct `StyleNano` / `StyleSpace` in `StylesheetManager` and mark them as obsolete

* rename `BackgroundPanel` classes for consistency

* tweak window / `ListContainer`

* oh right you use `///` not `/**`

* font system is bad, make it temporary

* acknowledge Divider funkyness

* remove use of class `Disabled`

* `ColorPalette` allow overriding colors with brace initialization

* review pass again

* tweak disabled button colors

* `StatusPalette` tweaks

* typo

* Make squiggly red line go away

* Delete `Redux`

* Remove all references to `Redux`

* make red less radioactive

* Store stylesheet name inside stylesheet class

* fix merge errors

* use RT's Oklab support instead

* shuffle around `StylesheetManager` fields

* apply stylesheets based off `StylesheetComponent`

* simplify `ColorPalette` construction

* add todo for `SheetletConfigType`

* `OptionButton` has a background color now

* fix disabled buttons

* sigh (red color palette fixed)

* make `ItemList` use primary palette

* Revert "apply stylesheets based off `StylesheetComponent`"

This reverts commit c05b147da845f6e04ff33d1cbd91a18a92c676d7.

* dead code removal

* buttons are green when pressed (we need togglebuttons)

---------

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
217 files changed:
Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs
Content.Client/Actions/UI/ActionAlertTooltip.cs
Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml
Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs
Content.Client/Administration/UI/PermissionsEui.cs
Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml
Content.Client/Arcade/BlockGameMenu.cs
Content.Client/Arcade/SpaceVillainArcadeMenu.cs
Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs
Content.Client/Atmos/UI/GasCanisterWindow.xaml
Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml
Content.Client/Bed/Cryostorage/CryostorageMenu.xaml
Content.Client/Bql/ToolshedVisualizeWindow.xaml
Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs
Content.Client/Cargo/UI/BountyEntry.xaml
Content.Client/Changelog/ChangelogButton.cs
Content.Client/Changelog/ChangelogTab.xaml.cs
Content.Client/Changelog/ChangelogWindow.xaml
Content.Client/Changelog/ChangelogWindow.xaml.cs
Content.Client/Chemistry/UI/ChemMasterWindow.xaml
Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
Content.Client/Chemistry/UI/HyposprayStatusControl.cs
Content.Client/Chemistry/UI/InjectorStatusControl.cs
Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs
Content.Client/Chemistry/UI/SolutionStatusControl.cs
Content.Client/Cloning/UI/AcceptCloningWindow.cs
Content.Client/Clothing/UI/ChameleonMenu.xaml.cs
Content.Client/Configurable/UI/ConfigurationMenu.cs
Content.Client/ContextMenu/UI/ContextMenuElement.xaml
Content.Client/ContextMenu/UI/ContextMenuElement.xaml.cs
Content.Client/Crayon/CrayonSystem.cs
Content.Client/Crayon/UI/CrayonWindow.xaml.cs
Content.Client/Credits/CreditsWindow.xaml.cs
Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs
Content.Client/GPS/UI/HandheldGpsStatusControl.cs
Content.Client/Gateway/UI/GatewayWindow.xaml.cs
Content.Client/Ghost/UI/ReturnToBodyMenu.cs
Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs
Content.Client/Implants/UI/ImplanterStatusControl.cs
Content.Client/Info/RulesAndInfoWindow.cs
Content.Client/Info/RulesPopup.xaml
Content.Client/Inventory/StrippableBoundUserInterface.cs
Content.Client/Kitchen/UI/MicrowaveMenu.xaml
Content.Client/LateJoin/LateJoinGui.cs
Content.Client/Launcher/LauncherConnectingGui.xaml
Content.Client/Launcher/LauncherConnectingGui.xaml.cs
Content.Client/Lobby/UI/CharacterPickerButton.xaml
Content.Client/Lobby/UI/CharacterSetupGui.xaml
Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs [new file with mode: 0644]
Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml
Content.Client/Lobby/UI/LobbyGui.xaml
Content.Client/Lobby/UI/ObserveWarningWindow.xaml
Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs
Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
Content.Client/MainMenu/UI/MainMenuSheetlet.cs [new file with mode: 0644]
Content.Client/MassMedia/Ui/ArticleEditorPanel.xaml
Content.Client/MassMedia/Ui/ArticleEditorPanel.xaml.cs
Content.Client/MassMedia/Ui/NewsArticleCard.xaml
Content.Client/Materials/UI/MaterialDisplay.xaml.cs
Content.Client/Medical/CrewMonitoring/CrewMonitoringWindow.xaml.cs
Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml.cs
Content.Client/NetworkConfigurator/NetworkConfiguratorDeviceList.xaml
Content.Client/NetworkConfigurator/NetworkConfiguratorLinkMenu.xaml.cs
Content.Client/NetworkConfigurator/Systems/NetworkConfiguratorSystem.cs
Content.Client/Nuke/NukeMenu.xaml
Content.Client/NukeOps/WarDeclaratorWindow.xaml
Content.Client/NukeOps/WarDeclaratorWindow.xaml.cs
Content.Client/Options/UI/OptionsTabControlRow.xaml
Content.Client/Options/UI/OptionsTabControlRow.xaml.cs
Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
Content.Client/PDA/PdaSheetlet.cs [new file with mode: 0644]
Content.Client/PDA/Ringer/RingtoneMenu.xaml.cs
Content.Client/Paper/UI/PaperSheetlet.cs [new file with mode: 0644]
Content.Client/Paper/UI/PaperWindow.xaml
Content.Client/Paper/UI/StampWidget.xaml
Content.Client/Pinpointer/UI/NavMapControl.cs
Content.Client/Power/APC/UI/ApcMenu.xaml
Content.Client/Power/APC/UI/ApcMenu.xaml.cs
Content.Client/Power/Generator/GeneratorWindow.xaml.cs
Content.Client/Power/PowerCharge/PowerChargeWindow.xaml
Content.Client/Power/PowerCharge/PowerChargeWindow.xaml.cs
Content.Client/Power/PowerMonitoringWindow.xaml
Content.Client/Power/PowerMonitoringWindow.xaml.Widgets.cs
Content.Client/Radiation/UI/GeigerItemControl.cs
Content.Client/Remotes/UI/DoorRemoteStatusControl.cs
Content.Client/Replay/UI/Loading/ReplayLoadingFailedControl.xaml
Content.Client/Robotics/UI/RoboticsConsoleWindow.xaml.cs
Content.Client/RoundEnd/RoundEndSummaryWindow.cs
Content.Client/Salvage/UI/OfferingWindowOption.xaml.cs
Content.Client/Salvage/UI/SalvageExpeditionConsoleBoundUserInterface.cs
Content.Client/SensorMonitoring/SensorMonitoringWindow.xaml.cs
Content.Client/Shuttles/UI/IFFConsoleWindow.xaml
Content.Client/Silicons/Borgs/BorgMenu.xaml.cs
Content.Client/Silicons/Borgs/BorgModuleControl.xaml
Content.Client/Silicons/Laws/Ui/LawDisplay.xaml
Content.Client/SprayPainter/SprayPainterSystem.cs
Content.Client/Stack/StackStatusControl.cs
Content.Client/Strip/StrippingMenu.cs
Content.Client/Stylesheets/BaseStylesheet.Fonts.cs [new file with mode: 0644]
Content.Client/Stylesheets/BaseStylesheet.Resources.cs [new file with mode: 0644]
Content.Client/Stylesheets/BaseStylesheet.Sheetlets.cs [new file with mode: 0644]
Content.Client/Stylesheets/BaseStylesheet.Textures.cs [new file with mode: 0644]
Content.Client/Stylesheets/BaseStylesheet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Colorspace/ColorExtensions.cs [new file with mode: 0644]
Content.Client/Stylesheets/CommonSheetletAttribute.cs [new file with mode: 0644]
Content.Client/Stylesheets/CommonStylesheet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Fonts/FontKind.cs [new file with mode: 0644]
Content.Client/Stylesheets/Fonts/NotoFontFamilyStack.cs [new file with mode: 0644]
Content.Client/Stylesheets/ISheetletConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/IStyleResources.cs [new file with mode: 0644]
Content.Client/Stylesheets/IStylesheetManager.cs
Content.Client/Stylesheets/NTSheetlets/NanoHeadingSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Palette/ColorPalette.cs [new file with mode: 0644]
Content.Client/Stylesheets/Palette/Palettes.cs [new file with mode: 0644]
Content.Client/Stylesheets/Palette/StatusPalette.cs [new file with mode: 0644]
Content.Client/Stylesheets/PalettedStylesheet.Palettes.cs [new file with mode: 0644]
Content.Client/Stylesheets/PalettedStylesheet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/IButtonConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/ICheckboxConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/IIconConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/ILineEditConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/INanoHeadingConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/IPanelConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/IPlaceholderConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/IRadialMenuConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/ISliderConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/IStripebackConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/ITabContainerConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/ITooltipConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/SheetletConfigs/IWindowConfig.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/ButtonSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/CheckboxSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/DividersSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/FancyTreeSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/HLineSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/Hud/ActionSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/Hud/ChatGameScreenSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/Hud/ChatSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/Hud/ContextMenuSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/Hud/ExamineButtonSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/Hud/ItemStatusSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/Hud/TooltipSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/ItemListSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/LabelSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/LineEditSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/ListContainerSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/MenuButtonSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/OptionButtonSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/PanelSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/PlaceholderSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/ProgressBarSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/RadialMenuSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/ScrollbarSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/SliderSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/StripebackSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/TabContainerSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/TextSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Sheetlets/WindowSheetlet.cs [new file with mode: 0644]
Content.Client/Stylesheets/StyleBase.cs
Content.Client/Stylesheets/StyleClass.cs [new file with mode: 0644]
Content.Client/Stylesheets/StyleNano.cs
Content.Client/Stylesheets/StyleProperties.cs [new file with mode: 0644]
Content.Client/Stylesheets/StyleSpace.cs
Content.Client/Stylesheets/StylesheetHelpers.cs [new file with mode: 0644]
Content.Client/Stylesheets/StylesheetManager.cs
Content.Client/Stylesheets/Stylesheets/NanotrasenStylesheet.Palettes.cs [new file with mode: 0644]
Content.Client/Stylesheets/Stylesheets/NanotrasenStylesheet.cs [new file with mode: 0644]
Content.Client/Stylesheets/Stylesheets/SystemStylesheet.Palettes.cs [new file with mode: 0644]
Content.Client/Stylesheets/Stylesheets/SystemStylesheet.cs [new file with mode: 0644]
Content.Client/Tabletop/TabletopSystem.cs
Content.Client/Thief/ThiefBackpackSet.xaml
Content.Client/Tools/Components/MultipleToolComponent.cs
Content.Client/Tools/UI/WelderStatusControl.cs
Content.Client/UserInterface/Controls/FancyWindow.xaml
Content.Client/UserInterface/Controls/FancyWindow.xaml.cs
Content.Client/UserInterface/Controls/HLine.cs
Content.Client/UserInterface/Controls/HighDivider.cs
Content.Client/UserInterface/Controls/ListContainer.cs
Content.Client/UserInterface/Controls/MenuButton.cs
Content.Client/UserInterface/Controls/NanoHeading.cs
Content.Client/UserInterface/Screens/DefaultGameScreen.xaml
Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml
Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs
Content.Client/UserInterface/Systems/Actions/Controls/ActionButton.cs
Content.Client/UserInterface/Systems/Actions/Controls/ActionTooltip.xaml [deleted file]
Content.Client/UserInterface/Systems/Actions/Controls/ActionTooltip.xaml.cs [deleted file]
Content.Client/UserInterface/Systems/Actions/Windows/ActionsWindow.xaml.cs
Content.Client/UserInterface/Systems/Atmos/GasTank/GasTankWindow.cs
Content.Client/UserInterface/Systems/Bwoink/AHelpUIController.cs
Content.Client/UserInterface/Systems/Character/CharacterUIController.cs
Content.Client/UserInterface/Systems/Chat/ChatUIController.cs
Content.Client/UserInterface/Systems/Chat/Controls/ChannelSelectorItemButton.cs
Content.Client/UserInterface/Systems/Chat/Controls/ChatInputBox.xaml.cs
Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml.cs
Content.Client/UserInterface/Systems/MenuBar/Widgets/GameTopMenuBar.xaml
Content.Client/UserInterface/Systems/Sandbox/Windows/SandboxWindow.xaml.cs
Content.Client/VendingMachines/UI/VendingMachineMenu.xaml.cs
Content.Client/Voting/UI/VoteCallMenu.xaml
Content.Client/Voting/UI/VoteCallMenu.xaml.cs
Content.Client/Voting/UI/VotePopup.xaml
Content.Client/Voting/UI/VotePopup.xaml.cs
Content.Client/Weapons/Ranged/Systems/GunSystem.AmmoCounter.cs
Content.Client/Wires/UI/WiresMenu.cs
Content.Replay/Menu/ReplayMainMenuControl.xaml
Resources/Locale/en-US/ui/power-apc.ftl
Resources/Textures/Interface/Nano/Radial/back_hover.png [new file with mode: 0644]
Resources/Textures/Interface/Nano/Radial/back_normal.png [new file with mode: 0644]
Resources/Textures/Interface/Nano/Radial/button_hover.png [new file with mode: 0644]
Resources/Textures/Interface/Nano/Radial/button_normal.png [new file with mode: 0644]
Resources/Textures/Interface/Nano/Radial/close_hover.png [new file with mode: 0644]
Resources/Textures/Interface/Nano/Radial/close_normal.png [new file with mode: 0644]
Resources/Textures/Interface/Nano/square.png [deleted file]
Resources/Textures/Interface/Nano/square.svg [deleted file]

index 209c58c9506dc4bb44f2eefe07039e5c8fb0e5d5..ea96b1337650a213f7b41a8fb9fdd72061e43785 100644 (file)
@@ -9,6 +9,7 @@ using Robust.Client.UserInterface.XAML;
 using Robust.Shared.Prototypes;
 using System.Numerics;
 using System.Linq;
+using Content.Client.Stylesheets;
 
 namespace Content.Client.Access.UI
 {
@@ -49,12 +50,12 @@ namespace Content.Client.Access.UI
             icons.Sort((x, y) => string.Compare(x.LocalizedJobName, y.LocalizedJobName, StringComparison.CurrentCulture));
             foreach (var jobIcon in icons)
             {
-                String styleBase = StyleBase.ButtonOpenBoth;
+                String styleBase = StyleClass.ButtonOpenBoth;
                 var modulo = i % JobIconColumnCount;
                 if (modulo == 0)
-                    styleBase = StyleBase.ButtonOpenRight;
+                    styleBase = StyleClass.ButtonOpenRight;
                 else if (modulo == JobIconColumnCount - 1)
-                    styleBase = StyleBase.ButtonOpenLeft;
+                    styleBase = StyleClass.ButtonOpenLeft;
 
                 // Generate buttons
                 var jobIconButton = new Button
index 7af78d9e5f206aafdfaa6e543deb91e2769ce6ae..2a85530c482efa5d5ccfc97998f65d600e129116 100644 (file)
@@ -119,11 +119,11 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer
             if (_groupedAccessLevels.Count > 1)
             {
                 if (AccessGroupList.ChildCount == 0)
-                    accessGroupButton.AddStyleClass(StyleBase.ButtonOpenLeft);
+                    accessGroupButton.AddStyleClass(StyleClass.ButtonOpenLeft);
                 else if (_groupedAccessLevels.Count > 1 && AccessGroupList.ChildCount == (_groupedAccessLevels.Count - 1))
-                    accessGroupButton.AddStyleClass(StyleBase.ButtonOpenRight);
+                    accessGroupButton.AddStyleClass(StyleClass.ButtonOpenRight);
                 else
-                    accessGroupButton.AddStyleClass(StyleBase.ButtonOpenBoth);
+                    accessGroupButton.AddStyleClass(StyleClass.ButtonOpenBoth);
             }
 
             accessGroupButton.Pressed = _accessGroupTabIndex == orderedAccessGroups.IndexOf(accessGroup);
index 664a67b406bf4028e00c668335286bbd534906fc..065c16d61bd27cc0527c2e647d7ac7980d2ab452 100644 (file)
@@ -23,9 +23,10 @@ namespace Content.Client.Actions.UI
 
         public ActionAlertTooltip(FormattedMessage name, FormattedMessage? desc, string? requires = null)
         {
+            Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSystem;
             _gameTiming = IoCManager.Resolve<IGameTiming>();
 
-            SetOnlyStyleClass(StyleNano.StyleClassTooltipPanel);
+            SetOnlyStyleClass(StyleClass.TooltipPanel);
 
             BoxContainer vbox;
             AddChild(vbox = new BoxContainer
@@ -36,7 +37,7 @@ namespace Content.Client.Actions.UI
             var nameLabel = new RichTextLabel
             {
                 MaxWidth = TooltipTextMaxWidth,
-                StyleClasses = {StyleNano.StyleClassTooltipActionTitle}
+                StyleClasses = { StyleClass.TooltipTitle }
             };
             nameLabel.SetMessage(name);
             vbox.AddChild(nameLabel);
@@ -46,7 +47,7 @@ namespace Content.Client.Actions.UI
                 var description = new RichTextLabel
                 {
                     MaxWidth = TooltipTextMaxWidth,
-                    StyleClasses = {StyleNano.StyleClassTooltipActionDescription}
+                    StyleClasses = { StyleClass.TooltipDesc }
                 };
                 description.SetMessage(desc);
                 vbox.AddChild(description);
@@ -55,7 +56,7 @@ namespace Content.Client.Actions.UI
             vbox.AddChild(_cooldownLabel = new RichTextLabel
             {
                 MaxWidth = TooltipTextMaxWidth,
-                StyleClasses = {StyleNano.StyleClassTooltipActionCooldown},
+                StyleClasses = { StyleClass.TooltipDesc },
                 Visible = false
             });
 
@@ -64,7 +65,7 @@ namespace Content.Client.Actions.UI
                 var requiresLabel = new RichTextLabel
                 {
                     MaxWidth = TooltipTextMaxWidth,
-                    StyleClasses = {StyleNano.StyleClassTooltipActionRequirements}
+                    StyleClasses = { StyleClass.TooltipDesc }
                 };
 
                 if (!FormattedMessage.TryFromMarkup("[color=#635c5c]" + requires + "[/color]", out var markup))
index cc5207bb3a0b5e17f10550d6e2c7697ea5dd7bc0..bfe6b31c28fcd04513eea746d75dcfea5f92695f 100644 (file)
@@ -7,7 +7,7 @@
         </PanelContainer.PanelOverride>
 
         <Control HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="600">
-            <PanelContainer StyleClasses="AngleRect" />
+            <PanelContainer StyleClasses="BackgroundPanel" />
 
             <BoxContainer Orientation="Vertical" Margin="4">
                 <RichTextLabel Name="Description" />
index 148cbf4e18e248d0aa2d1b159004511347d70769..7870dae7b2a52d97f32c4cf1b6ab10340b98cb31 100644 (file)
@@ -12,17 +12,19 @@ namespace Content.Client.Administration.UI.AdminRemarks;
 [GenerateTypedNameReferences]
 public sealed partial class AdminMessagePopupWindow : Control
 {
+    [Dependency] private readonly IStylesheetManager _styleMan = default!;
+
     private float _timer = float.MaxValue;
 
     public event Action? OnDismissPressed;
-
     public event Action? OnAcceptPressed;
 
     public AdminMessagePopupWindow()
     {
         RobustXamlLoader.Load(this);
+        IoCManager.InjectDependencies(this);
 
-        Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
+        Stylesheet = _styleMan.SheetSystem;
 
         AcceptButton.OnPressed += OnAcceptButtonPressed;
         DismissButton.OnPressed += OnDismissButtonPressed;
@@ -49,7 +51,8 @@ public sealed partial class AdminMessagePopupWindow : Control
             MessageContainer.AddChild(new AdminMessagePopupMessage(message));
         }
 
-        Description.SetMessage(FormattedMessage.FromMarkupOrThrow(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
+        Description.SetMessage(
+            FormattedMessage.FromMarkup(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
     }
 
     private void OnDismissButtonPressed(BaseButton.ButtonEventArgs obj)
index fe1237d4c90959e92056b3b6409719ab8aff63e8..96b53babb527ce54263cb2de1ca6dc20b43c3a9f 100644 (file)
@@ -27,7 +27,7 @@ namespace Content.Client.Administration.UI
         [Dependency] private readonly IClientAdminManager _adminManager = default!;
 
         private readonly Menu _menu;
-        private readonly List<DefaultWindow> _subWindows = new();
+        private readonly List<BaseWindow> _subWindows = new();
 
         private Dictionary<int, PermissionsEuiState.AdminRankData> _ranks =
             new();
@@ -216,7 +216,7 @@ namespace Content.Client.Administration.UI
                 var titleControl = new Label { Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant() };
                 if (admin.Title == null) // none
                 {
-                    titleControl.StyleClasses.Add(StyleBase.StyleClassItalic);
+                    titleControl.StyleClasses.Add(StyleClass.Italic);
                 }
 
                 al.AddChild(titleControl);
@@ -240,7 +240,7 @@ namespace Content.Client.Administration.UI
                 var rankControl = new Label { Text = rank };
                 if (italic)
                 {
-                    rankControl.StyleClasses.Add(StyleBase.StyleClassItalic);
+                    rankControl.StyleClasses.Add(StyleClass.Italic);
                 }
 
                 al.AddChild(rankControl);
@@ -340,10 +340,9 @@ namespace Content.Client.Administration.UI
                 tab.AddChild(adminVBox);
                 tab.AddChild(rankVBox);
 
-                Contents.AddChild(tab);
+                ContentsContainer.AddChild(tab);
+                ContentsContainer.MinSize = new(600, 400);
             }
-
-            protected override Vector2 ContentsMinimumSize => new Vector2(600, 400);
         }
 
         private sealed class EditAdminWindow : DefaultWindow
@@ -419,21 +418,21 @@ namespace Content.Client.Administration.UI
                     var inherit = new Button
                     {
                         Text = "I",
-                        StyleClasses = { StyleBase.ButtonOpenRight },
+                        StyleClasses = { StyleClass.ButtonOpenRight },
                         Disabled = disable,
                         Group = group,
                     };
                     var sub = new Button
                     {
                         Text = "-",
-                        StyleClasses = { StyleBase.ButtonOpenBoth },
+                        StyleClasses = { StyleClass.ButtonOpenBoth },
                         Disabled = disable,
                         Group = group
                     };
                     var plus = new Button
                     {
                         Text = "+",
-                        StyleClasses = { StyleBase.ButtonOpenLeft },
+                        StyleClasses = { StyleClass.ButtonOpenLeft },
                         Disabled = disable,
                         Group = group
                     };
@@ -479,7 +478,7 @@ namespace Content.Client.Administration.UI
 
                 bottomButtons.AddChild(SaveButton);
 
-                Contents.AddChild(new BoxContainer
+                ContentsContainer.AddChild(new BoxContainer
                 {
                     Orientation = LayoutOrientation.Vertical,
                     Children =
@@ -605,7 +604,7 @@ namespace Content.Client.Administration.UI
 
                 bottomButtons.AddChild(SaveButton);
 
-                Contents.AddChild(new BoxContainer
+                ContentsContainer.AddChild(new BoxContainer
                 {
                     Orientation = LayoutOrientation.Vertical,
                     Children =
index 9784b34557d91b52b8fbb47de9600fa667f836e3..88df194ecb106fac3dcf3df420556ad01c1d728c 100644 (file)
@@ -14,7 +14,7 @@
                               VerticalExpand="True"
                               Margin="0 0 0 0"
                               VerticalAlignment="Center">
-                    <Label Text="{Loc 'anomaly-generator-fuel-display'}" StyleClasses="StatusFieldTitle" />
+                    <Label Text="{Loc 'anomaly-generator-fuel-display'}" StyleClasses="highlight" />
                     <ProgressBar Name="FuelBar"
                                  HorizontalExpand="True"
                                  MaxValue="1"
@@ -27,8 +27,8 @@
                                Text="0 %" />
                     </ProgressBar>
                 </BoxContainer>
-                <RichTextLabel Name="CooldownLabel" StyleClasses="StatusFieldTitle" />
-                <RichTextLabel Name="ReadyLabel" StyleClasses="StatusFieldTitle" />
+                <RichTextLabel Name="CooldownLabel" StyleClasses="highlight" />
+                <RichTextLabel Name="ReadyLabel" StyleClasses="highlight" />
             </BoxContainer>
             <!--Sprite View-->
             <PanelContainer Margin="12 0 0 0"
index ad360c5439492af9aff5409bd5aa93eb8e79bf32..545afacc5e734d3ff9c5c400344a0169faf85dac 100644 (file)
@@ -338,7 +338,7 @@ namespace Content.Client.Arcade
             menuInnerPanel.AddChild(menuContainer);
             #endregion
 
-            Contents.AddChild(_mainPanel);
+            ContentsContainer.AddChild(_mainPanel);
 
             CanKeyboardFocus = true;
         }
index 1ee4c2681840654e3b49af25001ea51e822325d3..3d25d2208d327275cd98997abc79286d428e955e 100644 (file)
@@ -86,7 +86,7 @@ namespace Content.Client.Arcade
             newGame.OnPressed += _ => OnPlayerAction?.Invoke(SharedSpaceVillainArcadeComponent.PlayerAction.NewGame);
             grid.AddChild(newGame);
 
-            Contents.AddChild(grid);
+            ContentsContainer.AddChild(grid);
         }
 
         private void UpdateMetadata(SharedSpaceVillainArcadeComponent.SpaceVillainArcadeMetaDataUpdateMessage message)
index 64680b532160a9dc58d9f419ff22ddce79b8d629..60e06e98ce2621a95b1c86f89f172d90f6f819ef 100644 (file)
@@ -1,6 +1,6 @@
 using Content.Client.Atmos.Monitor.UI.Widgets;
 using Content.Client.Message;
-using Content.Client.Stylesheets;
+using Content.Client.Stylesheets.Palette;
 using Content.Client.UserInterface.Controls;
 using Content.Shared.Atmos;
 using Content.Shared.Atmos.Monitor;
@@ -17,7 +17,7 @@ namespace Content.Client.Atmos.Monitor.UI;
 public sealed partial class AirAlarmWindow : FancyWindow
 {
     public event Action<string, IAtmosDeviceData>? AtmosDeviceDataChanged;
-       public event Action<IAtmosDeviceData>? AtmosDeviceDataCopied;
+    public event Action<IAtmosDeviceData>? AtmosDeviceDataCopied;
     public event Action<string, AtmosMonitorThresholdType, AtmosAlarmThreshold, Gas?>? AtmosAlarmThresholdChanged;
     public event Action<AirAlarmMode>? AirAlarmModeChanged;
     public event Action<bool>? AutoModeChanged;
@@ -131,7 +131,7 @@ public sealed partial class AirAlarmWindow : FancyWindow
             case GasVentPumpData pump:
                 if (!_pumps.TryGetValue(addr, out var pumpControl))
                 {
-                    var control= new PumpControl(pump, addr);
+                    var control = new PumpControl(pump, addr);
                     control.PumpDataChanged += AtmosDeviceDataChanged;
                     control.PumpDataCopied += AtmosDeviceDataCopied;
                     _pumps.Add(addr, control);
@@ -186,11 +186,9 @@ public sealed partial class AirAlarmWindow : FancyWindow
     {
         return curAlarm switch
         {
-            AtmosAlarmType.Danger => StyleNano.DangerousRedFore,
-            AtmosAlarmType.Warning => StyleNano.ConcerningOrangeFore,
-            _ => StyleNano.GoodGreenFore,
+            AtmosAlarmType.Danger => Palettes.Status.Critical,
+            AtmosAlarmType.Warning => Palettes.Status.Warning,
+            _ => Palettes.Status.Good,
         };
     }
-
-
 }
index 38c631e6304301ed0a643b469d5cc17bca1245d1..f4b31fd95bb34bca5a326c78cf8a959e766c07b3 100644 (file)
@@ -1,3 +1,4 @@
+using Content.Client.Stylesheets;
 using Content.Shared.Atmos.Monitor;
 using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.Controls;
@@ -42,11 +43,11 @@ public sealed partial class ThresholdBoundControl : BoxContainer
 
         if (enabled)
         {
-            CBoundLabel.RemoveStyleClass("Disabled");
+            CBoundLabel.RemoveStyleClass(StyleClass.LabelWeak);
         }
         else
         {
-            CBoundLabel.SetOnlyStyleClass("Disabled");
+            CBoundLabel.SetOnlyStyleClass(StyleClass.LabelWeak);
         }
     }
 
index f76e32a31d75cd06757195b1516ea05ccc996f5b..3c7647385a0104de45eaa5ee1880c822cb39d484 100644 (file)
@@ -4,7 +4,7 @@
             MinSize="480 400" Title="Canister">
     <BoxContainer Orientation="Vertical" Margin="5 5 5 5" SeparationOverride="10">
         <BoxContainer Orientation="Vertical" VerticalExpand="True">
-            <Label Text="{Loc comp-gas-canister-ui-canister-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
+            <Label Text="{Loc comp-gas-canister-ui-canister-status}" StyleClasses="LabelHeading"/>
             <BoxContainer Orientation="Horizontal">
                 <Label Text="{Loc comp-gas-canister-ui-canister-pressure}"/>
                 <Label Name="CanisterPressureLabel" Align="Center" HorizontalExpand="True"/>
@@ -16,7 +16,7 @@
         </BoxContainer>
 
         <BoxContainer Orientation="Vertical" VerticalExpand="True">
-            <Label Text="{Loc comp-gas-canister-ui-holding-tank-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
+            <Label Text="{Loc comp-gas-canister-ui-holding-tank-status}" StyleClasses="LabelHeading"/>
             <BoxContainer Orientation="Horizontal">
                 <Label Text="{Loc comp-gas-canister-ui-holding-tank-label}"/>
                 <Label Name="TankLabelLabel" Text="{Loc comp-gas-canister-ui-holding-tank-label-empty}" Align="Center" HorizontalExpand="True"/>
@@ -29,7 +29,7 @@
         </BoxContainer>
 
         <BoxContainer Orientation="Vertical" VerticalExpand="True">
-            <Label Text="{Loc comp-gas-canister-ui-release-valve-status}" FontColorOverride="{x:Static s:StyleNano.NanoGold}" StyleClasses="LabelBig"/>
+            <Label Text="{Loc comp-gas-canister-ui-release-valve-status}" StyleClasses="LabelHeading"/>
             <BoxContainer Orientation="Horizontal">
                 <BoxContainer Orientation="Vertical">
                     <Label Text="{Loc comp-gas-canister-ui-release-pressure}"/>
index 5acb142a60721c8d3c088036e6098ad8977f5549..3378dc7797f4d6bd79e5fa971177f866423c98d6 100644 (file)
@@ -7,10 +7,7 @@
     Orientation="Vertical"
     HorizontalExpand="True"
     Margin="0 0 0 5">
-    <PanelContainer>
-        <PanelContainer.PanelOverride>
-            <graphics:StyleBoxFlat BackgroundColor="{xNamespace:Static style:StyleNano.ButtonColorDisabled}" />
-        </PanelContainer.PanelOverride>
+    <PanelContainer StyleClasses="PanelDark">
         <Collapsible Name="Collapsible">
             <CollapsibleHeading Name="Heading" MinHeight="35"/>
             <CollapsibleBody Name="Body">
index 5360cdb38e287c3567ca37f51ff15a2ed9b1d245..b0f8d5cb0a1c25e789d8d01bfe1a7f56096af355 100644 (file)
         <PanelContainer
             VerticalExpand="True"
             HorizontalExpand="True"
-            Margin="15">
-            <PanelContainer.PanelOverride>
-                <graphics:StyleBoxFlat BackgroundColor="{xNamespace:Static style:StyleNano.PanelDark}" />
-            </PanelContainer.PanelOverride>
+            Margin="15"
+            StyleClasses="PanelDark">
             <ScrollContainer VerticalExpand="True" HorizontalExpand="True">
                 <Control>
                     <Label Text="{Loc 'cryostorage-ui-label-no-bodies'}" Name="EmptyLabel" HorizontalAlignment="Center" VerticalAlignment="Center"/>
index 9affbf2181ac8c6b78738e2ececbec4f16799d22..b20d05b4f34e6e83cb1d4be087d04e1df4c2e36e 100644 (file)
@@ -1,7 +1,7 @@
 <DefaultWindow
     xmlns="https://spacestation14.io"
     Title="{Loc 'ui-bql-results-title'}">
-    <BoxContainer Orientation="Vertical">
+    <BoxContainer Orientation="Vertical" MinSize="500 700">
         <Label Name="StatusLabel" />
         <ScrollContainer VerticalExpand="True">
             <BoxContainer Orientation="Vertical" Name="ItemList" VerticalExpand="True" />
index 55ee029a91c92265792ecced1bfe0a872e0f5c3c..35a7524a6f0a51105bfaa2eab4ff9da7059abe84 100644 (file)
@@ -21,8 +21,6 @@ internal sealed partial class ToolshedVisualizeWindow : DefaultWindow
         RobustXamlLoader.Load(this);
     }
 
-    protected override Vector2 ContentsMinimumSize => new(500, 700);
-
     public void Update((string name, NetEntity entity)[] entities)
     {
         StatusLabel.Text = _loc.GetString("ui-bql-results-status", ("count", entities.Length));
index 7c61323bd55674664736e989a05cd5253f57d004..99874cf1a5db4c84cb9fb6ac2a7cdda97d1c7846 100644 (file)
@@ -3,7 +3,7 @@
               Margin="10 10 10 0"
               HorizontalExpand="True"
               Visible="True">
-    <PanelContainer StyleClasses="AngleRect" HorizontalExpand="True">
+    <PanelContainer StyleClasses="BackgroundPanel" HorizontalExpand="True">
         <BoxContainer Orientation="Vertical"
                       HorizontalExpand="True">
             <BoxContainer Orientation="Horizontal">
index 6e8862492c310353f3e54930121d33f6a3f0662c..8611866b0dedc8c17b70068dd392dfb21b17d6d1 100644 (file)
@@ -36,12 +36,12 @@ namespace Content.Client.Changelog
             if (_changelogManager.NewChangelogEntries)
             {
                 Text = Loc.GetString("changelog-button-new-entries");
-                StyleClasses.Add(StyleBase.ButtonCaution);
+                StyleClasses.Add(StyleClass.Negative);
             }
             else
             {
                 Text = Loc.GetString("changelog-button");
-                StyleClasses.Remove(StyleBase.ButtonCaution);
+                StyleClasses.Remove(StyleClass.Negative);
             }
         }
     }
index 851ed2042200117ed623e147fdbe55c11bb81e09..61ce5095947162bd29c10b534015eb3edd87de7a 100644 (file)
@@ -58,7 +58,7 @@ public sealed partial class ChangelogTab : Control
             ChangelogBody.AddChild(new Label
             {
                 Text = dayNice,
-                StyleClasses = { StyleBase.StyleClassLabelHeading },
+                StyleClasses = { StyleClass.LabelHeading },
                 Margin = new Thickness(4, 6, 0, 0)
             });
 
@@ -117,7 +117,7 @@ public sealed partial class ChangelogTab : Control
                     };
 
                     readDivider.AddChild(hBox);
-                    readDivider.AddChild(new PanelContainer { StyleClasses = { StyleBase.ClassLowDivider } });
+                    readDivider.AddChild(new PanelContainer { StyleClasses = { StyleClass.LowDivider } });
                     ChangelogBody.AddChild(readDivider);
 
                     if (first)
index 355452dbfad3409b3fec9a33f74f4f86903b7c40..8325de02b57109c7949db9e79e733fb305ba9b0f 100644 (file)
@@ -2,8 +2,9 @@
                     xmlns:ui="clr-namespace:Content.Client.Changelog"
                     Title="{Loc 'changelog-window-title'}"
                     MinSize="500 400"
-                    SetSize="500 400">
-    <PanelContainer StyleClasses="AngleRect" />
+                    SetSize="500 400"
+                    Stylesheet="Interface">
+    <PanelContainer StyleClasses="BackgroundPanel" />
     <BoxContainer Orientation="Vertical">
         <TabContainer Name="Tabs" Access="Public" HorizontalExpand="True" VerticalExpand="True" />
         <PanelContainer StyleClasses="LowDivider" />
index d8f560f15189e0fc5358c2e6652279175a64b623..801d0859c3a8649e26aa403a7f1dc12852764867 100644 (file)
@@ -21,8 +21,7 @@ namespace Content.Client.Changelog
         public ChangelogWindow()
         {
             RobustXamlLoader.Load(this);
-            WindowTitle.AddStyleClass(StyleBase.StyleClassLabelHeading);
-            Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
+            WindowTitle.AddStyleClass(StyleClass.LabelHeading);
         }
 
         protected override void Opened()
index aca316f6b353e040380672c97041a27338a1dd5b..1ecc5cb16d74a5e6c14a5ae6924c9220faf2ec47 100644 (file)
@@ -82,7 +82,7 @@
                 <Label Text="{Loc 'chem-master-window-packaging-text'}" />
                 <Control HorizontalExpand="True"/>
                 <Label Text="{Loc 'chem-master-window-buffer-label'}" />
-                <Label Name="BufferCurrentVolume" StyleClasses="LabelSecondaryColor" />
+                <Label Name="BufferCurrentVolume" StyleClasses="LabelWeak" />
             </BoxContainer>
 
             <!-- Wrap the packaging info-->
                     <BoxContainer Orientation="Horizontal">
                         <Label Text="{Loc 'chem-master-window-pills-label'}" />
                         <Control HorizontalExpand="True" MinSize="50 0" />
-                        <Label Text="{Loc 'chem-master-window-pills-number-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" />
+                        <Label Text="{Loc 'chem-master-window-pills-number-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
                         <SpinBox MinSize="100 0" Name="PillNumber" Access="Public" Value="0" />
-                        <Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" />
+                        <Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
                         <SpinBox MinSize="100 0" Name="PillDosage" Access="Public" Value="1" />
                         <Button MinSize="80 0" Name="CreatePillButton" Access="Public" Text="{Loc 'chem-master-window-create-button'}" />
                     </BoxContainer>
                     <BoxContainer Orientation="Horizontal">
                         <Label Text="{Loc 'chem-master-window-bottles-label'}" />
                         <Control HorizontalExpand="True" MinSize="50 0" />
-                        <Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelSecondaryColor" />
+                        <Label Text="{Loc 'chem-master-window-dose-label'}" Margin="5 0 0 0" StyleClasses="LabelWeak" />
                         <SpinBox MinSize="100 0" Name="BottleDosage" Access="Public" Value="0" />
                         <Button MinSize="80 0" Name="CreateBottleButton" Access="Public" Text="{Loc 'chem-master-window-create-button'}" />
                     </BoxContainer>
index 14b55066e9e9df3c5c13828881444cf263be9aa1..d610f34b29f18d26cb80f6c40f2bf3046a3d4587 100644 (file)
@@ -53,14 +53,14 @@ namespace Content.Client.Chemistry.UI
             {
                 // For every button decide which stylebase to have
                 // Every row has 10 buttons
-                String styleBase = StyleBase.ButtonOpenBoth;
+                String styleBase = StyleClass.ButtonOpenBoth;
                 uint modulo = i % 10;
                 if (i > 0 && modulo == 0)
-                    styleBase = StyleBase.ButtonOpenRight;
+                    styleBase = StyleClass.ButtonOpenRight;
                 else if (i > 0 && modulo == 9)
-                    styleBase = StyleBase.ButtonOpenLeft;
+                    styleBase = StyleClass.ButtonOpenLeft;
                 else if (i == 0)
-                    styleBase = StyleBase.ButtonOpenRight;
+                    styleBase = StyleClass.ButtonOpenRight;
 
                 // Generate buttons
                 PillTypeButtons[i] = new Button
@@ -113,16 +113,16 @@ namespace Content.Client.Chemistry.UI
 
             var buttonConfigs = new (string text, ChemMasterReagentAmount amount, string styleClass)[]
             {
-                ("1", ChemMasterReagentAmount.U1, StyleBase.ButtonOpenBoth),
-                ("5", ChemMasterReagentAmount.U5, StyleBase.ButtonOpenBoth),
-                ("10", ChemMasterReagentAmount.U10, StyleBase.ButtonOpenBoth),
-                ("15", ChemMasterReagentAmount.U15, StyleBase.ButtonOpenBoth),
-                ("20", ChemMasterReagentAmount.U20, StyleBase.ButtonOpenBoth),
-                ("25", ChemMasterReagentAmount.U25, StyleBase.ButtonOpenBoth),
-                ("30", ChemMasterReagentAmount.U30, StyleBase.ButtonOpenBoth),
-                ("50", ChemMasterReagentAmount.U50, StyleBase.ButtonOpenBoth),
-                ("100", ChemMasterReagentAmount.U100, StyleBase.ButtonOpenBoth),
-                (Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleBase.ButtonOpenLeft),
+                ("1", ChemMasterReagentAmount.U1, StyleClass.ButtonOpenBoth),
+                ("5", ChemMasterReagentAmount.U5, StyleClass.ButtonOpenBoth),
+                ("10", ChemMasterReagentAmount.U10, StyleClass.ButtonOpenBoth),
+                ("15", ChemMasterReagentAmount.U15, StyleClass.ButtonOpenBoth),
+                ("20", ChemMasterReagentAmount.U20, StyleClass.ButtonOpenBoth),
+                ("25", ChemMasterReagentAmount.U25, StyleClass.ButtonOpenBoth),
+                ("30", ChemMasterReagentAmount.U30, StyleClass.ButtonOpenBoth),
+                ("50", ChemMasterReagentAmount.U50, StyleClass.ButtonOpenBoth),
+                ("100", ChemMasterReagentAmount.U100, StyleClass.ButtonOpenBoth),
+                (Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleClass.ButtonOpenLeft),
             };
 
             var buttons = new List<ReagentButton>();
@@ -252,7 +252,7 @@ namespace Content.Client.Chemistry.UI
             var bufferVol = new Label
             {
                 Text = $"{state.BufferCurrentVolume}u",
-                StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+                StyleClasses = { StyleClass.LabelWeak }
             };
             bufferHBox.AddChild(bufferVol);
 
@@ -321,7 +321,7 @@ namespace Content.Client.Chemistry.UI
                     new Label
                     {
                         Text = $"{info.CurrentVolume}/{info.MaxVolume}",
-                        StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+                        StyleClasses = { StyleClass.LabelWeak }
                     }
                 }
             });
@@ -376,7 +376,7 @@ namespace Content.Client.Chemistry.UI
                     new Label
                     {
                         Text = $"{quantity}u",
-                        StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+                        StyleClasses = { StyleClass.LabelWeak }
                     },
 
                     // Padding
index 37b6fb5ed88f31b45d7852177ccf63f746569449..a564bcefc6ee62afc70ba899467691d78b2c0c29 100644 (file)
@@ -23,7 +23,7 @@ public sealed class HyposprayStatusControl : Control
     {
         _parent = parent;
         _solutionContainers = solutionContainers;
-        _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+        _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
         AddChild(_label);
     }
 
index 0358876b76e90e9d63298840b6a933de27dae0b3..24f988bd354cf4ab0cdc2b6e73a8c83bcce5ad5c 100644 (file)
@@ -24,7 +24,7 @@ public sealed class InjectorStatusControl : Control
     {
         _parent = parent;
         _solutionContainers = solutionContainers;
-        _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+        _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
         AddChild(_label);
     }
 
index 2b64eed57089394191f5502333fb84c64084ffb2..1b56a1b4ec1b443caf2158d9933fc6617f145dec 100644 (file)
@@ -107,7 +107,7 @@ namespace Content.Client.Chemistry.UI
                 var quantityLabel = new Label
                 {
                     Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", quantity)),
-                    StyleClasses = { StyleNano.StyleClassLabelSecondaryColor },
+                    StyleClasses = { StyleClass.LabelWeak },
                 };
 
                 ContainerInfo.Children.Add(new BoxContainer
index 1a33ffb0e1462179c5468ff956255575d426e6dd..8a551a262ca79f6d0807dbb4e11b2b9cd21ad389 100644 (file)
@@ -29,7 +29,7 @@ public sealed class SolutionStatusControl : PollingItemStatusControl<SolutionSta
         _parent = parent;
         _entityManager = entityManager;
         _solutionContainers = solutionContainers;
-        _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+        _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
         AddChild(_label);
     }
 
index 01824ad48279b943e1a46a99acce6952ccd8ce24..e4f472068dbbd8053dbb48fb46c53c4d3c603770 100644 (file)
@@ -17,7 +17,7 @@ namespace Content.Client.Cloning.UI
 
             Title = Loc.GetString("accept-cloning-window-title");
 
-            Contents.AddChild(new BoxContainer
+            ContentsContainer.AddChild(new BoxContainer
             {
                 Orientation = LayoutOrientation.Vertical,
                 Children =
index fb4447bdf986374774644f1e2af9d3542e88837e..eb5ce3051b13cdc7008f33b68fd364fa3da6068c 100644 (file)
@@ -67,7 +67,7 @@ public sealed partial class ChameleonMenu : DefaultWindow
                 MinSize = new Vector2(48, 48),
                 HorizontalExpand = true,
                 Group = group,
-                StyleClasses = {StyleBase.ButtonSquare},
+                StyleClasses = {StyleClass.ButtonSquare},
                 ToggleMode = true,
                 Pressed = _selectedId == id,
                 ToolTip = proto.Name
index 4ca68c5fa0da659963aa389f49fbf1b406a4d1dc..845c72f95427144f24ced57228b6c47860973ed0 100644 (file)
@@ -68,7 +68,7 @@ namespace Content.Client.Configurable.UI
             outerColumn.AddChild(Column);
             baseContainer.AddChild(outerColumn);
             baseContainer.AddChild(confirmButton);
-            Contents.AddChild(baseContainer);
+            ContentsContainer.AddChild(baseContainer);
         }
 
         private void OnConfirm(ButtonEventArgs args)
index d0e39865b84e431bd010e311942fdb467c8b4a78..271b6b1bffd82792d89a03e779caf00843496e6b 100644 (file)
@@ -13,7 +13,8 @@
                 Name="IconLabel"
                 HorizontalAlignment="Right"
                 VerticalAlignment="Bottom"
-                StyleClasses="contextMenuIconLabel"
+                StyleClasses="LabelSubText"
+                Align="Right"
                 Visible="false"/>
         </SpriteView>
         <RichTextLabel
index 364986dd9d232754f01944e6d4e3a10990662ccf..91d34b037bb5b645d494d2dedc383c745f308b91 100644 (file)
@@ -16,7 +16,6 @@ namespace Content.Client.ContextMenu.UI
     {
         public const string StyleClassContextMenuButton = "contextMenuButton";
         public const string StyleClassContextMenuExpansionTexture = "contextMenuExpansionTexture";
-        public const string StyleClassEntityMenuIconLabel = "contextMenuIconLabel";
 
         public const float ElementMargin = 2;
         public const float ElementHeight = 32;
index e990263bf31d06df36a97abcd5441e5899c57704..c0d127dd4095fdfb8df699c78253e01693dbee1d 100644 (file)
@@ -34,7 +34,7 @@ public sealed class CrayonSystem : SharedCrayonSystem
             _crayon = crayon;
             _charges = charges;
             _capacity = entityManage.GetComponent<LimitedChargesComponent>(_crayon.Owner).MaxCharges;
-            _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+            _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
             AddChild(_label);
         }
 
index f1ac5a79cb53e2ab40c1c92ba19e1b8ceb631b39..166ba0183245b8a0889ca1d49ab7c5c4bbcfc2a0 100644 (file)
@@ -137,7 +137,8 @@ namespace Content.Client.Crayon.UI
 
         private void ButtonOnPressed(ButtonEventArgs obj)
         {
-            if (obj.Button.Name == null) return;
+            if (obj.Button.Name == null)
+                return;
 
             _selected = obj.Button.Name;
             _autoSelected = null;
index 6035bcc2bdc720480eeea0e1560c10ef5f68c2ee..c068eb5a8cd1fa0d12000872e3cfcc49a4c83b0f 100644 (file)
@@ -258,7 +258,7 @@ public sealed partial class CreditsWindow : DefaultWindow
         foreach (var entry in CreditsManager.GetLicenses(_resourceManager).OrderBy(p => p.Name))
         {
             licensesContainer.AddChild(new Label
-                { StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = entry.Name });
+                { StyleClasses = { StyleClass.LabelHeading }, Text = entry.Name });
 
             // We split these line by line because otherwise
             // the LGPL causes Clyde to go out of bounds in the rendering code.
@@ -299,7 +299,7 @@ public sealed partial class CreditsWindow : DefaultWindow
 
             first = false;
             patronsContainer.AddChild(new Label
-                { StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = $"{tier.Key}" });
+                { StyleClasses = { StyleClass.LabelHeading }, Text = $"{tier.Key}" });
 
             var msg = string.Join(", ", tier.OrderBy(p => p.Name).Select(p => p.Name));
 
@@ -347,7 +347,7 @@ public sealed partial class CreditsWindow : DefaultWindow
 
             first = false;
             ss14ContributorsContainer.AddChild(new Label
-                { StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = title });
+                { StyleClasses = { StyleClass.LabelHeading }, Text = title });
 
             var label = new RichTextLabel();
             var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}");
index adeb451a07648100633e18876824365ac16299a5..873fb851b763716da858ed11d9e0d43e3f31dfeb 100644 (file)
@@ -157,15 +157,12 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
             {
                 var panelContainer = new PanelContainer
                 {
-                    PanelOverride = new StyleBoxFlat
-                    {
-                        BackgroundColor = StyleNano.ButtonColorDefault
-                    },
                     Children =
                     {
                         button
                     }
                 };
+                panelContainer.SetOnlyStyleClass(StyleClass.PanelLight);
                 Grid.AddChild(panelContainer);
             }
             else
index 57645e386e7390b127ab6cf6960ceaf69118a4e4..2feca1f176daaac0e825e1a0c543b06ed3c075df 100644 (file)
@@ -21,7 +21,7 @@ public sealed class HandheldGpsStatusControl : Control
         _parent = parent;
         _entMan = IoCManager.Resolve<IEntityManager>();
         _transform = _entMan.System<TransformSystem>();
-        _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+        _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
         AddChild(_label);
         UpdateGpsDetails();
     }
index 9fb7c339d3c91c7140ac93944631faaf591c8094..4e4076d98cd6cc862476ff9e6fe373a2582e8da8 100644 (file)
@@ -159,7 +159,7 @@ public sealed partial class GatewayWindow : FancyWindow,
 
             if (Pressable())
             {
-                openButton.AddStyleClass(StyleBase.ButtonCaution);
+                openButton.AddStyleClass(StyleClass.Negative);
             }
 
             var buttonContainer = new BoxContainer()
index 69f04993c9b36527b1bb4877f8a4228fe7ee9291..384ffb6be6f271818ed8a63db7f832aff73199ff 100644 (file)
@@ -15,7 +15,7 @@ public sealed class ReturnToBodyMenu : DefaultWindow
     {
         Title = Loc.GetString("ghost-return-to-body-title");
 
-        Contents.AddChild(new BoxContainer
+        ContentsContainer.AddChild(new BoxContainer
         {
             Orientation = LayoutOrientation.Vertical,
             Children =
index c12ddb9319e2bd5414e2ea626daaf3b9090129df..6f66990b4e998bd6241fd0452800a1d15ee7d961 100644 (file)
@@ -116,7 +116,7 @@ public sealed partial class ChameleonControllerMenu : FancyWindow
         var button = new Button
         {
             HorizontalExpand = true,
-            StyleClasses = {StyleBase.ButtonSquare},
+            StyleClasses = {StyleClass.ButtonSquare},
             ToolTip = Loc.GetString(name),
             Text = Loc.GetString(name),
             Margin = new Thickness(0, 0, 15, 0),
index 24445eeecf079ce3f91a92ebb1d2ab21740bc7bd..43579ae6bea82e831dbcf78992cd2720a2ca0814 100644 (file)
@@ -19,7 +19,7 @@ public sealed class ImplanterStatusControl : Control
     {
         IoCManager.InjectDependencies(this);
         _parent = parent;
-        _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+        _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
         _label.MaxWidth = 350;
         AddChild(new ClipControl { Children = { _label } });
 
index b9131dcb3c07339916f4abd4df49b2996a69428c..4f483cf26c83b71f392c2d36d8036a3ffb7c7d8a 100644 (file)
@@ -36,7 +36,7 @@ namespace Content.Client.Info
 
             PopulateTutorial(tutorialList);
 
-            Contents.AddChild(rootContainer);
+            ContentsContainer.AddChild(rootContainer);
 
             SetSize = new Vector2(650, 650);
         }
index 80ed415550843c774e732bee0d63c66ffc321672..c94f061865545ec947efa395088b6cba08d2016e 100644 (file)
@@ -16,7 +16,7 @@
                             Text="{Loc 'ui-rules-accept'}"
                             Disabled="True" />
                     <Button Name="QuitButton"
-                            StyleClasses="Caution"
+                            StyleClasses="negative"
                             Text="{Loc 'ui-escape-quit'}" />
                 </BoxContainer>
             </BoxContainer>
index 381406d2ac4db786cdafbca9dda19a5b9638ff94..6d18bd6bda41f1a951071e7a43aab756b798ad02 100644 (file)
@@ -154,7 +154,7 @@ namespace Content.Client.Inventory
                 var button = new Button()
                 {
                     Text = Loc.GetString("strippable-bound-user-interface-stripping-menu-ensnare-button"),
-                    StyleClasses = { StyleBase.ButtonOpenRight }
+                    StyleClasses = { StyleClass.ButtonOpenRight }
                 };
 
                 button.OnPressed += (_) => SendPredictedMessage(new StrippingEnsnareButtonPressed());
index cd81ea0a9bf18c827afe5fb65d0b16afcdcaf631..cf0b5634c545247bc3904c900427301a5a8f33e2 100644 (file)
@@ -2,7 +2,6 @@
     xmlns="https://spacestation14.io"
     xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
     xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
-    xmlns:style="clr-namespace:Content.Client.Stylesheets"
     Title="{Loc 'microwave-menu-title'}"
     MinWidth="512"
     MinSize="512 256">
                                         Name="StartButton"
                                         Access="Public"
                                         Text="{Loc 'microwave-menu-start-button'}"
-                                        StyleClasses="ButtonColorGreen"
+                                        StyleClasses="positive"
                                         TextAlign="Center" />
                                     <Button
                                         Name="EjectButton"
                                         Access="Public"
                                         Text="{Loc 'microwave-menu-eject-all-text'}"
                                         ToolTip="{Loc 'microwave-menu-eject-all-tooltip'}"
-                                        StyleClasses="ButtonColorRed"
+                                        StyleClasses="negative"
                                         TextAlign="Center" />
                                 </BoxContainer>
                             </BoxContainer>
index ae62e64ff814262924d2c4182a4b388a1136db60..a4ee341eb529a54feeaacf520cb15f0f9932c5ce 100644 (file)
@@ -61,7 +61,7 @@ namespace Content.Client.LateJoin
                 VerticalExpand = true,
             };
 
-            Contents.AddChild(_base);
+            ContentsContainer.AddChild(_base);
 
             _jobRequirements.Updated += RebuildUI;
             RebuildUI();
index 34b32f84fea3aefae52558a546989fb1b385cdb2..a8e5a63704ecc91d661d0f71a863e5d14891592a 100644 (file)
@@ -5,7 +5,7 @@
          xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
     <parallax:ParallaxControl SpeedX="20"/>
     <Control HorizontalAlignment="Center" VerticalAlignment="Center">
-        <PanelContainer StyleClasses="AngleRect" />
+        <PanelContainer StyleClasses="BackgroundPanel" />
         <BoxContainer Orientation="Vertical" MinSize="300 200">
             <BoxContainer Orientation="Horizontal">
                 <Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}"
@@ -68,7 +68,7 @@
         </BoxContainer>
     </Control>
     <!-- Bottom window for tips -->
-    <PanelContainer Name="LoginTips" StyleClasses="AngleRect" Margin="0 10" MaxWidth="600" VerticalExpand="True" VerticalAlignment="Bottom">
+    <PanelContainer Name="LoginTips" StyleClasses="BackgroundPanel" Margin="0 10" MaxWidth="600" VerticalExpand="True" VerticalAlignment="Bottom">
         <BoxContainer Orientation="Vertical" VerticalExpand="True">
             <controls:StripeBack>
                 <BoxContainer Orientation="Horizontal" HorizontalAlignment="Center">
index cf89f98095e69916fea93e1adec73c2aa3378621..fe48642ed3bb6728794a9fafaf54a506330a9145 100644 (file)
@@ -43,7 +43,7 @@ namespace Content.Client.Launcher
 
             LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
 
-            Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
+            Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSystem;
 
             ChangeLoginTip();
             RetryButton.OnPressed += ReconnectButtonPressed;
index ecd706f5a744b86d000a666f13ba597dd9a0c5d5..723da433a157436f7d5ef9adf9a650f76f9467d9 100644 (file)
@@ -18,7 +18,7 @@
         <Button Name="ConfirmDeleteButton"
                 Text="{Loc 'character-setup-gui-character-picker-button-confirm-delete-button'}"
                 Visible="False"
-                ModulateSelfOverride="{x:Static style:StyleNano.ButtonColorCautionDefault}"/>
+                StyleClasses="negative"/>
 
     </BoxContainer>
 </ContainerButton>
index c463987a1feb0edf45dbfaec4dac166ca117c062..09ed989fc6ca2a5b603787a475f1f4f3facf6db7 100644 (file)
                         Text="{Loc 'character-setup-gui-character-setup-close-button'}"
                         StyleClasses="ButtonBig"/>
             </BoxContainer>
-            <PanelContainer>
-                <PanelContainer.PanelOverride>
-                    <gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
-                </PanelContainer.PanelOverride>
+            <PanelContainer StyleClasses="highlight">
             </PanelContainer>
             <BoxContainer Orientation="Horizontal" VerticalExpand="True" SeparationOverride="0">
                 <ScrollContainer MinSize="325 0" Margin="5 5 0 0">
                     <BoxContainer Name="Characters" Orientation="Vertical" />
                 </ScrollContainer>
-                <PanelContainer MinSize="2 0">
-                    <PanelContainer.PanelOverride>
-                        <gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
-                    </PanelContainer.PanelOverride>
+                <PanelContainer MinSize="2 0" StyleClasses="highlight">
                 </PanelContainer>
                 <BoxContainer Name="CharEditor" HorizontalExpand="True" />
             </BoxContainer>
index b568491b67455c9420aa8f2441d18809f893b9f3..e9b1f41a4164ed11a31b8c7825be77f62d4c73b0 100644 (file)
@@ -6,8 +6,8 @@ using Content.Client.Lobby.UI.Loadouts;
 using Content.Client.Lobby.UI.Roles;
 using Content.Client.Message;
 using Content.Client.Players.PlayTimeTracking;
-using Content.Client.Sprite;
 using Content.Client.Stylesheets;
+using Content.Client.Sprite;
 using Content.Client.UserInterface.Systems.Guidebook;
 using Content.Shared.CCVar;
 using Content.Shared.Clothing;
@@ -539,7 +539,7 @@ namespace Content.Client.Lobby.UI
                     {
                         Text = Loc.GetString(category.Name),
                         Margin = new Thickness(0, 10, 0, 0),
-                        StyleClasses = { StyleBase.StyleClassLabelHeading },
+                        StyleClasses = { StyleClass.LabelHeading },
                     });
                 }
 
@@ -1348,7 +1348,7 @@ namespace Content.Client.Lobby.UI
                 return;
 
             const string style = "SpeciesInfoDefault";
-            SpeciesInfoButton.StyleClasses.Add(style);
+            SpeciesInfoButton.StyleIdentifier = style;
         }
 
         private void UpdateMarkings()
diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs b/Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs
new file mode 100644 (file)
index 0000000..016541d
--- /dev/null
@@ -0,0 +1,28 @@
+using Content.Client.Resources;
+using Content.Client.Stylesheets;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Lobby.UI;
+
+[CommonSheetlet]
+public sealed class HumanoidProfileEditorSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        return
+        [
+            E<TextureButton>()
+                .Identifier("SpeciesInfoDefault")
+                .Prop(TextureButton.StylePropertyTexture,
+                    ResCache.GetTexture("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
+            // copied from `StyleNano`, but this is unused
+            // E<TextureButton>()
+            //     .Identifier("SpeciesInfoWarning")
+            //     .Prop(TextureButton.StylePropertyTexture,
+            //         ResCache.GetTexture("/Textures/Interface/info.svg.192dpi.png"))
+            //     .Prop(Control.StylePropertyModulateSelf, sheet.HighlightPalette[0]),
+        ];
+    }
+}
index 0deb1c82ba787f6b6094b83c533d4e515e1f7034..f89b38ca8a153d2f9e53f170adbc7ed34d7b64c0 100644 (file)
@@ -1,7 +1,7 @@
 <BoxContainer xmlns="https://spacestation14.io"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Orientation="Vertical">
-    <PanelContainer StyleClasses="AngleRect" HorizontalExpand="True" Margin="5">
+    <PanelContainer StyleClasses="BackgroundPanel" HorizontalExpand="True" Margin="5">
         <BoxContainer Name="LoadoutsContainer" Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True"/>
     </PanelContainer>
     <!-- Buffer space so we have 10 margin between controls but also 10 to the borders -->
index 64291816ab81c06a9c0764471f30d7fcfceb2e39..9b5c761644a7b4a33408f6501f327298d948a8da 100644 (file)
@@ -20,7 +20,7 @@
                 <Control Name="DefaultState" VerticalExpand="True">
                     <BoxContainer Name="TopLeft" Orientation="Vertical">
                         <!-- Left Top Panel -->
-                        <PanelContainer StyleClasses="AngleRect" HorizontalAlignment="Left" Name="LeftSideTop"
+                        <PanelContainer StyleClasses="BackgroundPanel" HorizontalAlignment="Left" Name="LeftSideTop"
                                         VerticalAlignment="Top">
                             <BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800">
                                 <info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center"
@@ -53,7 +53,7 @@
                     <!-- Left Bot Panel -->
                     <BoxContainer Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom">
                         <info:DevInfoBanner Name="DevInfoBanner" VerticalExpand="false" Margin="3 3 3 3" />
-                        <PanelContainer StyleClasses="AngleRect">
+                        <PanelContainer StyleClasses="BackgroundPanel">
                             <RichTextLabel Name="LobbySong" Access="Public" HorizontalAlignment="Center" />
                         </PanelContainer>
                     </BoxContainer>
@@ -63,7 +63,7 @@
                 <Control Access="Public" Visible="False" Name="CharacterSetupState" VerticalExpand="True" />
             </BoxContainer>
             <!-- Right Panel -->
-            <PanelContainer Name="RightSide" Access="Public" StyleClasses="AngleRect" HorizontalAlignment="Right" VerticalExpand="True"
+            <PanelContainer Name="RightSide" Access="Public" StyleClasses="BackgroundPanel" HorizontalAlignment="Right" VerticalExpand="True"
                             VerticalAlignment="Stretch">
                 <BoxContainer Orientation="Vertical" HorizontalExpand="True">
                     <!-- Top row -->
@@ -73,7 +73,7 @@
                                HorizontalExpand="True" HorizontalAlignment="Center" />
                     </BoxContainer>
                     <!-- Gold line -->
-                    <controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" />
+                    <controls:HLine StyleClasses="highlight" Thickness="2" />
                     <controls:HSpacer Spacing="10" />
                     <!-- Voting & misc button bar -->
                     <BoxContainer Orientation="Horizontal" MinSize="0 40" HorizontalAlignment="Right">
@@ -97,7 +97,7 @@
                     <controls:HSpacer Spacing="5" />
                     <BoxContainer MinHeight="10" />
                     <!-- Gold line -->
-                    <controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" Access="Public" />
+                    <controls:HLine StyleClasses="highlight" Thickness="2" Access="Public" />
                     <controls:HSpacer Spacing="10" />
                     <widgets:ChatBox Name="Chat" Access="Public" VerticalExpand="True" Margin="3 3 3 3" MinHeight="50" />
                 </BoxContainer>
             </PanelContainer>
         </SplitContainer>
         <PanelContainer Name="ExpandPanel"
-                        StyleClasses="AngleRect" 
+                        StyleClasses="BackgroundPanel"
                         HorizontalAlignment="Right"
                         VerticalAlignment="Top"
                         Margin="0 2 2 0"
index 2feac5792a1ecec530c23f9c9cac299281a98a59..adc1673326166cc31dee2f91d4e793af2f21f1c7 100644 (file)
@@ -7,7 +7,7 @@
         <BoxContainer Orientation="Horizontal">
             <Button Name="NevermindButton" Text="{Loc 'observe-nevermind'}" SizeFlagsStretchRatio="1"/>
             <Control HorizontalExpand="True" SizeFlagsStretchRatio="2" />
-            <cc:CommandButton Command="observe" Name="ObserveButton" StyleClasses="Caution" Text="{Loc 'observe-confirm'}" SizeFlagsStretchRatio="1"/>
+            <cc:CommandButton Command="observe" Name="ObserveButton" StyleClasses="negative" Text="{Loc 'observe-confirm'}" SizeFlagsStretchRatio="1"/>
             <cc:CommandButton Command="observe admin" Name="ObserveAsAdminButton" Text="{Loc 'observe-as-admin'}" SizeFlagsStretchRatio="1" Visible="False"/>
         </BoxContainer>
     </BoxContainer>
index ce75537355c9ec801f150a64d6daeaad516caba9..3e6f4cfb2ff3f3ac65aab2e19d2074a804096e80 100644 (file)
@@ -31,9 +31,9 @@ public sealed partial class RequirementsSelector : BoxContainer
         RobustXamlLoader.Load(this);
         _options = new RadioOptions<int>(RadioOptionsLayout.Horizontal)
         {
-            FirstButtonStyle = StyleBase.ButtonOpenRight,
-            ButtonStyle = StyleBase.ButtonOpenBoth,
-            LastButtonStyle = StyleBase.ButtonOpenLeft,
+            FirstButtonStyle = StyleClass.ButtonOpenRight,
+            ButtonStyle = StyleClass.ButtonOpenBoth,
+            LastButtonStyle = StyleClass.ButtonOpenLeft,
             HorizontalExpand = true,
         };
         //Override default radio option button width
@@ -50,7 +50,7 @@ public sealed partial class RequirementsSelector : BoxContainer
             Text = Loc.GetString("role-timer-locked"),
             Visible = true,
             HorizontalAlignment = HAlignment.Center,
-            StyleClasses = {StyleBase.StyleClassLabelSubText},
+            StyleClasses = {StyleClass.LabelSubText},
         };
 
         _lockStripe = new StripeBack()
index 1d5244305dca3aa761a6cbc6cfb947401ae814f2..45bd94f7b65f6a137011942c8c2844eb9b55a7aa 100644 (file)
@@ -11,6 +11,9 @@ namespace Content.Client.MainMenu.UI;
 [GenerateTypedNameReferences]
 public sealed partial class MainMenuControl : Control
 {
+    public const string StyleIdentifierMainMenu = "mainMenu";
+    public const string StyleIdentifierMainMenuVBox = "mainMenuVBox";
+
     public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
     {
         RobustXamlLoader.Load(this);
diff --git a/Content.Client/MainMenu/UI/MainMenuSheetlet.cs b/Content.Client/MainMenu/UI/MainMenuSheetlet.cs
new file mode 100644 (file)
index 0000000..45171af
--- /dev/null
@@ -0,0 +1,27 @@
+using Content.Client.Stylesheets;
+using Content.Client.Stylesheets.Fonts;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.MainMenu.UI;
+
+[CommonSheetlet]
+public sealed class MainMenuSheetlet : Sheetlet<NanotrasenStylesheet>
+{
+    public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
+    {
+        return
+        [
+            // make those buttons bigger
+            E<Button>()
+                .Identifier(MainMenuControl.StyleIdentifierMainMenu)
+                .ParentOf(E<Label>())
+                .Font(sheet.BaseFont.GetFont(16, FontKind.Bold)),
+            E<BoxContainer>()
+                .Identifier(MainMenuControl.StyleIdentifierMainMenuVBox)
+                .Prop(BoxContainer.StylePropertySeparation, 2),
+        ];
+    }
+}
index f4fb9da06220a753d7772f9415c1f7e2582dde1f..d12b90918bbf207f483934cddb98ad8f38758261 100644 (file)
@@ -1,7 +1,7 @@
 <Control xmlns="https://spacestation14.io"
          xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
          MouseFilter="Stop">
-    <PanelContainer StyleClasses="BackgroundOpenLeft"/>
+    <PanelContainer StyleClasses="BackgroundPanelOpenLeft"/>
     <PanelContainer>
         <PanelContainer.PanelOverride>
             <graphics:StyleBoxFlat BorderColor="#25252A" BorderThickness="0 0 0 3"/>
@@ -20,7 +20,7 @@
             <Label Text="{Loc news-write-ui-article-name-label}" Margin="17 10 0 9" VerticalAlignment="Center"/>
             <LineEdit Name="TitleField" Margin="6 10 0 9" MinWidth="260" MinHeight="23" Access="Public"/>
             <Control HorizontalExpand="True" />
-            <Label Name="RichTextInfoLabel" Text="?" MouseFilter="Pass" Margin="14 0" StyleClasses="LabelSecondaryColor"/>
+            <Label Name="RichTextInfoLabel" Text="?" MouseFilter="Pass" Margin="14 0" StyleClasses="LabelWeak"/>
         </BoxContainer>
         <Control Name="TextEditPanel" VerticalExpand="True" Margin="11 0 11 0">
             <PanelContainer>
@@ -43,7 +43,7 @@
         <BoxContainer Orientation="Horizontal" Margin="12 5 12 8">
             <Control>
                 <Button Name="ButtonCancel" SetHeight="32" SetWidth="85"
-                        StyleClasses="ButtonColorRed" Text="{Loc news-write-ui-cancel-text}"/>
+                        StyleClasses="negative" Text="{Loc news-write-ui-cancel-text}"/>
             </Control>
             <Control HorizontalExpand="True"/>
             <BoxContainer Orientation="Horizontal">
index 90a66bec7f3079e666a4c92fd311fb020a602ef0..fef94a2bd32c7276b07ceb47624ca91974860b8d 100644 (file)
@@ -22,8 +22,8 @@ public sealed partial class ArticleEditorPanel : Control
     {
         RobustXamlLoader.Load(this);
 
-        ButtonPublish.StyleClasses.Add(StyleBase.ButtonOpenLeft);
-        ButtonPublish.StyleClasses.Add(StyleNano.StyleClassButtonColorGreen);
+        ButtonPublish.StyleClasses.Add(StyleClass.ButtonOpenLeft);
+        ButtonPublish.StyleClasses.Add(StyleClass.Positive);
 
         ContentField.GetChild(0).Margin = new Thickness(9, 3);
         // Customize scrollbar width and margin. This is not possible in xaml
index abfc1cbcf118462f71d338bd60af41581d63adf9..09e207b7cc11306a03af6c8d036d1db0841896df 100644 (file)
@@ -3,7 +3,7 @@
          xmlns:system="clr-namespace:System;assembly=System.Runtime"
          xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
          Margin="0 0 0 8">
-    <PanelContainer StyleClasses="AngleRect" ModulateSelfOverride="#2b2b31"/>
+    <PanelContainer StyleClasses="BackgroundPanel" ModulateSelfOverride="#2b2b31"/>
     <BoxContainer Orientation="Vertical" SetHeight="60">
         <Control HorizontalExpand="True" SetHeight="27">
             <PanelContainer>
@@ -21,7 +21,7 @@
                     HorizontalAlignment="Right" Margin="8 6 6 6" SetHeight="19" SetWidth="52" Access="Public">
                 <Button.StyleClasses>
                     <system:String>ButtonSmall</system:String>
-                    <system:String>ButtonColorRed</system:String>
+                    <system:String>negative</system:String>
                 </Button.StyleClasses>
             </controls:ConfirmButton>
         </BoxContainer>
index eaa16af658af6644474157200e51af0165ba5acd..8a6c18feeaa5d31948249461169d7a303cecfd96 100644 (file)
@@ -77,11 +77,11 @@ public sealed partial class MaterialDisplay : PanelContainer
         {
             var sheetsToEject = sheetsToEjectArray[i];
 
-            var styleClass = StyleBase.ButtonOpenBoth;
+            var styleClass = StyleClass.ButtonOpenBoth;
             if (i == 0)
-                styleClass = StyleBase.ButtonOpenRight;
+                styleClass = StyleClass.ButtonOpenRight;
             else if (i == sheetsToEjectArray.Length - 1)
-                styleClass = StyleBase.ButtonOpenLeft;
+                styleClass = StyleClass.ButtonOpenLeft;
 
             var button = new Button
             {
index 7b69d082677306cacfb871c35db1a91ed7637475..3872fa50cc953410bd6375dcf9b98f79bc12d4d9 100644 (file)
@@ -130,7 +130,7 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
             };
 
             deparmentLabel.SetMessage(department);
-            deparmentLabel.StyleClasses.Add(StyleNano.StyleClassTooltipActionDescription);
+            deparmentLabel.StyleClasses.Add("font-large");
 
             SensorsTable.AddChild(deparmentLabel);
 
@@ -156,7 +156,6 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
             };
 
             deparmentLabel.SetMessage(Loc.GetString("crew-monitoring-ui-no-department-label"));
-            deparmentLabel.StyleClasses.Add(StyleNano.StyleClassTooltipActionDescription);
 
             SensorsTable.AddChild(deparmentLabel);
 
@@ -194,7 +193,7 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
             };
 
             if (sensor.SuitSensorUid == _trackedEntity)
-                sensorButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
+                sensorButton.AddStyleClass(StyleClass.Positive);
 
             SensorsTable.AddChild(sensorButton);
 
@@ -364,10 +363,10 @@ public sealed partial class CrewMonitoringWindow : FancyWindow
             var castSensor = (CrewMonitoringButton) sensor;
 
             if (castSensor.SuitSensorUid == prevTrackedEntity)
-                castSensor.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
+                castSensor.RemoveStyleClass(StyleClass.Positive);
 
             else if (castSensor.SuitSensorUid == currTrackedEntity)
-                castSensor.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
+                castSensor.AddStyleClass(StyleClass.Positive);
 
             if (castSensor?.Coordinates == null)
                 continue;
index fcd2f7591873bad12b7d3447e854c7095e57c08a..0afda39b1d5f3e42c20504856e52c7189de9f8b6 100644 (file)
@@ -15,8 +15,8 @@ public sealed partial class NetworkConfiguratorConfigurationMenu : FancyWindow
     {
         RobustXamlLoader.Load(this);
 
-        Clear.StyleClasses.Add(StyleBase.ButtonOpenLeft);
-        Clear.StyleClasses.Add(StyleNano.StyleClassButtonColorRed);
+        Clear.StyleClasses.Add(StyleClass.ButtonOpenLeft);
+        Clear.StyleClasses.Add(StyleClass.Negative);
         DeviceList.OnRemoveAddress += args =>
         {
             OnRemoveAddress?.Invoke(args);
index c99ae1e26f20772ce168f2822389d30e8c9a42b5..8e587750cd41943cd5b4ecad0c54c58e5b14efad 100644 (file)
@@ -1,9 +1,8 @@
 <ScrollContainer xmlns="https://spacestation14.io"
                  HorizontalExpand="True"
                  VerticalExpand="True">
-    <Control VerticalExpand="True">
-        <PanelContainer StyleClasses="PanelBackgroundBaseDark"></PanelContainer>
+    <PanelContainer StyleClasses="PanelDark" VerticalExpand="True">
         <BoxContainer Orientation="Vertical" Name="DeviceList" VerticalExpand="True" SeparationOverride="4">
         </BoxContainer>
-    </Control>
+    </PanelContainer>
 </ScrollContainer>
index a316b9e34ae75bd58d6c35816333ef1cc4580657..d7c010e2e352b9bbddd26218e9adb787b3193664 100644 (file)
@@ -47,7 +47,7 @@ public sealed partial class NetworkConfiguratorLinkMenu : FancyWindow
         FooterPanel.PanelOverride = footerStyleBox;
         MainPanel.PanelOverride = new StyleBoxFlat(Color.FromHex(PanelBgColor));
 
-        ButtonClear.AddStyleClass("ButtonColorRed");
+        ButtonClear.AddStyleClass("negative");
         ButtonLinkDefault.Disabled = true;
 
         _links = new LinksRender(ButtonContainerLeft, ButtonContainerRight);
index 9828222447996200e2b0897ae424e0da93ebedeb..0a55cf0db84782001f10505dae3eb0aa1781d198 100644 (file)
@@ -112,7 +112,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
         {
             _configurator = configurator;
             _keyBindingName = keyBindingName;
-            _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+            _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
             AddChild(_label);
         }
 
index 227465341d354041e17114fa7161c838aaa91000..494c9c118cbb97440121dc571019306162b6ad7b 100644 (file)
@@ -39,7 +39,7 @@
                 <Button Name="ArmButton"
                         Text="{Loc 'nuke-user-interface-arm-button'}"
                         Access="Public"
-                        StyleClasses="Caution"/>
+                        StyleClasses="negative"/>
             </BoxContainer>
         </BoxContainer>
     </BoxContainer>
index 43381158a2c877c1607d6033aeb076930f73c3e8..ad813bd7dfee629c99b27bf5cc577acf5c5ffbb2 100644 (file)
@@ -9,7 +9,7 @@
                   Access="Public" />
         <Button Name="WarButton"
                 Text="{Loc 'war-declarator-ui-try-war-button'}"
-                StyleClasses="Caution"
+                StyleClasses="negative"
                 Access="Public"/>
         <BoxContainer Orientation="Vertical" HorizontalExpand="True">
             <Label Name="StatusLabel"
index e191e821c220b6eef00fd9c4a2968de1591e37a6..68487e98bd9740abe71978ea74c53f3b16a25e71 100644 (file)
@@ -58,38 +58,38 @@ public sealed partial class WarDeclaratorWindow : FancyWindow
                 WarButton.Disabled = true;
                 StatusLabel.Text = Loc.GetString("war-declarator-boost-declared");
                 UpdateTimer();
-                StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateLow);
+                StatusLabel.SetOnlyStyleClass(StyleClass.Highlight);
                 break;
             case WarConditionStatus.YesWar:
                 WarButton.Text = Loc.GetString("war-declarator-ui-war-button");
                 StatusLabel.Text = Loc.GetString("war-declarator-boost-possible");
                 UpdateTimer();
-                StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood);
+                StatusLabel.SetOnlyStyleClass(StyleClass.Positive);
                 break;
             case WarConditionStatus.NoWarSmallCrew:
                 StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
                 InfoLabel.Text = Loc.GetString("war-declarator-conditions-small-crew");
-                StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
+                StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
                 break;
             case WarConditionStatus.NoWarShuttleDeparted:
                 StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
                 InfoLabel.Text = Loc.GetString("war-declarator-conditions-left-outpost");
-                StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
+                StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
                 break;
             case WarConditionStatus.NoWarTimeout:
                 StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
                 InfoLabel.Text = Loc.GetString("war-declarator-conditions-time-out");
-                StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
+                StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
                 break;
             case WarConditionStatus.NoWarUnknown:
                 StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
                 InfoLabel.Text = Loc.GetString("war-declarator-conditions-unknown");
-                StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
+                StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
                 break;
             default:
                 StatusLabel.Text = Loc.GetString("war-declarator-boost-impossible");
                 InfoLabel.Text = Loc.GetString("war-declarator-conditions-unknown");
-                StatusLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
+                StatusLabel.SetOnlyStyleClass(StyleClass.Negative);
                 break;
         }
     }
index fafdee4df761ee4d6b234544d8e60ee038e73a8c..9bf8ae18d8051581c1d4fd07d07b13bb14fc10cc 100644 (file)
@@ -9,7 +9,7 @@
 
             <Button Name="ResetButton"
                     Text="{Loc 'ui-options-reset-all'}"
-                    StyleClasses="Caution" />
+                    StyleClasses="negative" />
             <Button Name="ApplyButton"
                     Text="{Loc 'ui-options-apply'}"
                     StyleClasses="OpenLeft" />
index ad262f94a26754d3819a22ad11901aa968744e6a..32680dfcc280597a6b6d1ce0bf8b657dc5fa78fb 100644 (file)
@@ -58,7 +58,7 @@ public sealed partial class OptionsTabControlRow : Control
         RobustXamlLoader.Load(this);
         IoCManager.InjectDependencies(this);
 
-        ResetButton.StyleClasses.Add(StyleBase.ButtonOpenRight);
+        ResetButton.StyleClasses.Add(StyleClass.ButtonOpenRight);
         ApplyButton.OnPressed += ApplyButtonPressed;
         ResetButton.OnPressed += ResetButtonPressed;
         DefaultButton.OnPressed += DefaultButtonPressed;
index 59c9607b246bfa689fe87428a325ea4e32a82bf6..f92f66df31842943abbcfe54bb0bd1aeb7ee8f17 100644 (file)
@@ -130,8 +130,7 @@ namespace Content.Client.Options.UI.Tabs
                 KeybindsContainer.AddChild(new Label
                 {
                     Text = Loc.GetString(headerContents),
-                    FontColorOverride = StyleNano.NanoGold,
-                    StyleClasses = { StyleNano.StyleClassLabelKeyText }
+                    StyleClasses = { StyleClass.LabelKeyText }
                 });
             }
 
@@ -528,9 +527,9 @@ namespace Content.Client.Options.UI.Tabs
                     HorizontalAlignment = HAlignment.Left
                 };
 
-                BindButton1 = new BindButton(parent, this, StyleBase.ButtonOpenRight);
-                BindButton2 = new BindButton(parent, this, StyleBase.ButtonOpenLeft);
-                ResetButton = new Button { Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleBase.ButtonCaution } };
+                BindButton1 = new BindButton(parent, this, StyleClass.ButtonOpenRight);
+                BindButton2 = new BindButton(parent, this, StyleClass.ButtonOpenLeft);
+                ResetButton = new Button { Text = Loc.GetString("ui-options-bind-reset"), StyleClasses = { StyleClass.Negative } };
 
                 var hBox = new BoxContainer
                 {
diff --git a/Content.Client/PDA/PdaSheetlet.cs b/Content.Client/PDA/PdaSheetlet.cs
new file mode 100644 (file)
index 0000000..4791ae5
--- /dev/null
@@ -0,0 +1,93 @@
+using Content.Client.PDA;
+using Content.Client.Stylesheets;
+using Content.Client.Stylesheets.Sheetlets;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.PDA;
+
+[CommonSheetlet]
+public sealed class PdaSheetlet : Sheetlet<NanotrasenStylesheet>
+{
+    public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
+    {
+        IPanelConfig panelCfg = sheet;
+        IButtonConfig btnCfg = sheet;
+
+        // TODO: This should have its own set of images, instead of using button cfg directly.
+        var angleBorderRect =
+            sheet.GetTexture(panelCfg.GeometricPanelBorderPath).IntoPatch(StyleBox.Margin.All, 10);
+
+        return
+        [
+            //PDA - Backgrounds
+            E<PanelContainer>()
+                .Class("PdaContentBackground")
+                .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.SquareStyleBox(sheet))
+                .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#25252a")),
+
+            E<PanelContainer>()
+                .Class("PdaBackground")
+                .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.SquareStyleBox(sheet))
+                .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#000000")),
+
+            E<PanelContainer>()
+                .Class("PdaBackgroundRect")
+                .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.BaseStyleBox((sheet)))
+                .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#717059")),
+
+            E<PanelContainer>()
+                .Class("PdaBorderRect")
+                .Prop(PanelContainer.StylePropertyPanel, angleBorderRect),
+
+            //PDA - Buttons
+            E<PdaSettingsButton>()
+                .Pseudo(ContainerButton.StylePseudoClassNormal)
+                .Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
+                .Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
+
+            E<PdaSettingsButton>()
+                .Pseudo(ContainerButton.StylePseudoClassHover)
+                .Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.HoverColor))
+                .Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
+
+            E<PdaSettingsButton>()
+                .Pseudo(ContainerButton.StylePseudoClassPressed)
+                .Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.PressedColor))
+                .Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
+
+            E<PdaSettingsButton>()
+                .Pseudo(ContainerButton.StylePseudoClassDisabled)
+                .Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
+                .Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.DisabledFgColor)),
+
+            E<PdaProgramItem>()
+                .Pseudo(ContainerButton.StylePseudoClassNormal)
+                .Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.NormalBgColor)),
+
+            E<PdaProgramItem>()
+                .Pseudo(ContainerButton.StylePseudoClassHover)
+                .Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
+
+            E<PdaProgramItem>()
+                .Pseudo(ContainerButton.StylePseudoClassPressed)
+                .Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
+
+            //PDA - Text
+            E<Label>()
+                .Class("PdaContentFooterText")
+                .Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(10))
+                .Prop(Label.StylePropertyFontColor, Color.FromHex("#757575")),
+
+            E<Label>()
+                .Class("PdaWindowFooterText")
+                .Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(10))
+                .Prop(Label.StylePropertyFontColor, Color.FromHex("#333d3b")),
+        ];
+    }
+}
+
index 83024c22fb94ad4ac86258db196cea5d3084b413..13be031e2062cb55a1e4739d4e9e0dbc99b7f6d3 100644 (file)
@@ -43,12 +43,12 @@ namespace Content.Client.PDA.Ringer
                     if (!isValid)
                     {
                         input.Text = PreviousNoteInputs[index];
-                        input.AddStyleClass("Caution");
+                        input.AddStyleClass("highlight");
                     }
                     else
                     {
                         PreviousNoteInputs[index] = input.Text;
-                        input.RemoveStyleClass("Caution");
+                        input.RemoveStyleClass("highlight");
                     }
 
                     input.CursorPosition = input.Text.Length;
@@ -59,7 +59,7 @@ namespace Content.Client.PDA.Ringer
                     if (!IsNote(input.Text))
                     {
                         input.Text = PreviousNoteInputs[index];
-                        input.RemoveStyleClass("Caution");
+                        input.RemoveStyleClass("highlight");
                     }
                 };
 
@@ -68,7 +68,7 @@ namespace Content.Client.PDA.Ringer
                     if (!IsNote(input.Text))
                     {
                         input.Text = PreviousNoteInputs[index];
-                        input.RemoveStyleClass("Caution");
+                        input.RemoveStyleClass("highlight");
                     }
                     input.CursorPosition = input.Text.Length;
                 };
diff --git a/Content.Client/Paper/UI/PaperSheetlet.cs b/Content.Client/Paper/UI/PaperSheetlet.cs
new file mode 100644 (file)
index 0000000..2af29de
--- /dev/null
@@ -0,0 +1,33 @@
+using Content.Client.Resources;
+using Content.Client.Stylesheets;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Paper.UI;
+
+[CommonSheetlet]
+public sealed class PaperSheetlet : Sheetlet<NanotrasenStylesheet>
+{
+    public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
+    {
+        var windowCfg = (IWindowConfig)sheet;
+
+        var paperBackground = ResCache.GetTexture("/Textures/Interface/Paper/paper_background_default.svg.96dpi.png")
+            .IntoPatch(StyleBox.Margin.All, 16);
+        var paperBox = new StyleBoxTexture
+            { Texture = sheet.GetTexture(windowCfg.TransparentWindowBackgroundBorderedPath) };
+        paperBox.SetPatchMargin(StyleBox.Margin.All, 2);
+
+        return
+        [
+            E<PanelContainer>().Identifier("PaperContainer").Panel(paperBox),
+            E<PanelContainer>()
+                .Identifier("PaperDefaultBorder")
+                .Prop(PanelContainer.StylePropertyPanel, paperBackground),
+        ];
+    }
+}
index 5e882b29e6c347aaa434c199204535c2b3d59dd2..8ec51e962d9fa9b320e5b540910385be5d17eb32 100644 (file)
@@ -4,18 +4,18 @@
     SetSize="510 660"> <!-- Provide some reasonable sizes by default. Can be changed by the component -->
 
     <BoxContainer Name="ContentsRoot" Orientation="Vertical">
-        <PanelContainer StyleClasses="AngleRect" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="6">
+        <PanelContainer StyleClasses="BackgroundPanel" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="6">
             <TextureButton Name="CloseButton" StyleClasses="windowCloseButton"/>
         </PanelContainer>
-        <PanelContainer Name="PaperBackground" StyleClasses="PaperDefaultBorder" VerticalExpand="True" HorizontalExpand="True">
+        <PanelContainer Name="PaperBackground" StyleIdentifier="PaperDefaultBorder" VerticalExpand="True" HorizontalExpand="True">
             <ScrollContainer Name="ScrollingContents" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalExpand="True" VerticalExpand="True" HScrollEnabled="False">
                 <PanelContainer Name="PaperContent" VerticalExpand="True" HorizontalExpand="True" MaxWidth="600">
                     <BoxContainer Orientation="Vertical" VerticalAlignment="Stretch">
                         <TextureButton Name="HeaderImage" HorizontalAlignment="Center" VerticalAlignment="Top" MouseFilter="Ignore"/>
                         <Control Name="TextAlignmentPadding" VerticalAlignment="Top"/>
-                        <RichTextLabel Name="BlankPaperIndicator" StyleClasses="LabelSecondaryColor" VerticalAlignment="Top" HorizontalAlignment="Center"/>
+                        <RichTextLabel Name="BlankPaperIndicator" StyleClasses="LabelWeak" VerticalAlignment="Top" HorizontalAlignment="Center"/>
                         <RichTextLabel StyleClasses="PaperWrittenText" Name="WrittenTextLabel" VerticalAlignment="Top"/>
-                        <BoxContainer Name="InputContainer" Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Stretch">
+                        <BoxContainer Name="InputContainer" StyleIdentifier="PaperContainer" Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Stretch">
                             <PanelContainer StyleClasses="TransparentBorderedWindowPanel" MinHeight="100"
                                 VerticalAlignment="Stretch" VerticalExpand="True" HorizontalExpand="True">
                                 <TextEdit Name="Input" StyleClasses="PaperLineEdit" Access="Public" />
index 7ba187ecb9a789e451d63c822cedf604d3cf70b2..2e0183694cf8ef69138e216e936a41c30b6c60d4 100644 (file)
@@ -1,10 +1,7 @@
 <paper:StampWidget xmlns="https://spacestation14.io"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:style="clr-namespace:Content.Client.Stylesheets"
-    xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
-    xmlns:paper="clr-namespace:Content.Client.Paper.UI" HorizontalAlignment="Center" Margin="6">
-
-    <paper:StampLabel Name="StampedByLabel" StyleClasses="LabelHeadingBigger"
-        FontColorOverride="{x:Static style:StyleNano.DangerousRedFore}"
-        Margin="12 6 12 6"/>
+                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                   xmlns:paper="clr-namespace:Content.Client.Paper.UI"
+                   HorizontalAlignment="Center"
+                   Margin="6">
+    <paper:StampLabel Name="StampedByLabel" StyleClasses="LabelHeadingBigger" Margin="12 6 12 6" />
 </paper:StampWidget>
index b774b7d8b566e011f36e5fe33ccac1428e3bb3d5..47b5534d124ff6903201d24a70db7f02d46ec104 100644 (file)
@@ -128,11 +128,7 @@ public partial class NavMapControl : MapGridControl
 
         var topPanel = new PanelContainer()
         {
-            PanelOverride = new StyleBoxFlat()
-            {
-                BackgroundColor = StyleNano.ButtonColorContext.WithAlpha(1f),
-                BorderColor = StyleNano.PanelDark
-            },
+            StyleClasses = { StyleClass.PanelDark },
             VerticalExpand = false,
             HorizontalExpand = true,
             SetWidth = 650f,
index 6cb46a4360cddb952cd530e3f2f6f57a5da4bfcf..4c14dcc0adef09e918fb8389ba653830c51628ca 100644 (file)
                     <GridContainer Margin="10 0 0 0" Columns="2">
                         <!-- Power On/Off -->
                         <Label Text="{Loc 'apc-menu-breaker-label'}" HorizontalExpand="True"
-                                StyleClasses="StatusFieldTitle" MinWidth="120"/>
+                                StyleClasses="highlight" MinWidth="120"/>
                         <BoxContainer Orientation="Horizontal" MinWidth="90">
                             <Button Name="BreakerButton" Text="{Loc 'apc-menu-breaker-button'}" HorizontalExpand="True" ToggleMode="True"/>
                         </BoxContainer>
                         <!--Charging Status-->
-                        <Label Text="{Loc 'apc-menu-external-label'}" StyleClasses="StatusFieldTitle" MinWidth="120" />
+                        <Label Text="{Loc 'apc-menu-external-label'}" StyleClasses="highlight" MinWidth="120" />
                         <Label Name="ExternalPowerStateLabel" Text="{Loc 'apc-menu-power-state-good'}" />
                         <!--Battery Power-->
-                        <Label Text="{Loc 'apc-menu-power-label'}" StyleClasses="StatusFieldTitle" MinWidth="120" />
+                        <Label Text="{Loc 'apc-menu-power-label'}" StyleClasses="highlight" MinWidth="120" />
                         <Label Name="PowerLabel"/>
                     </GridContainer>
                 </BoxContainer>
index 65464abd540c548b93692e6f972943cc46f949ac..14c00986ce339257b912f7d94768c9143144a325 100644 (file)
@@ -1,4 +1,4 @@
-using Robust.Client.AutoGenerated;
+using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.XAML;
 using Robust.Client.GameObjects;
 using Robust.Shared.IoC;
@@ -7,10 +7,6 @@ using System.Numerics;
 using Content.Client.Stylesheets;
 using Content.Shared.APC;
 using Robust.Client.Graphics;
-using Robust.Client.UserInterface.Controls;
-using Robust.Shared.GameObjects;
-using Robust.Shared.Localization;
-using Robust.Shared.Maths;
 using FancyWindow = Content.Client.UserInterface.Controls.FancyWindow;
 
 namespace Content.Client.Power.APC.UI
@@ -44,7 +40,7 @@ namespace Content.Client.Power.APC.UI
 
             if (PowerLabel != null)
             {
-                PowerLabel.Text = castState.Power + " W";
+                PowerLabel.Text = Loc.GetString("apc-menu-power-state-label-text", ("power", castState.Power));
             }
 
             if (ExternalPowerStateLabel != null)
@@ -53,15 +49,15 @@ namespace Content.Client.Power.APC.UI
                 {
                     case ApcExternalPowerState.None:
                         ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-none");
-                        ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
+                        ExternalPowerStateLabel.SetOnlyStyleClass("negative");
                         break;
                     case ApcExternalPowerState.Low:
                         ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-low");
-                        ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateLow);
+                        ExternalPowerStateLabel.SetOnlyStyleClass("highlight");
                         break;
                     case ApcExternalPowerState.Good:
                         ExternalPowerStateLabel.Text = Loc.GetString("apc-menu-power-state-good");
-                        ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood);
+                        ExternalPowerStateLabel.SetOnlyStyleClass("positive");
                         break;
                     default:
                         throw new ArgumentOutOfRangeException();
index 161482e09052f7d3aa7ea3e482c6e16b983eb8ab..807d08aa627dcbae2c2f0426912e4cd24f32dbca 100644 (file)
@@ -92,19 +92,19 @@ public sealed partial class GeneratorWindow : FancyWindow
         if (starting)
         {
             StatusLabel.Text = _loc.GetString("portable-generator-ui-status-starting");
-            StatusLabel.SetOnlyStyleClass("Caution");
+            StatusLabel.SetOnlyStyleClass("negative");
 
             StartProgress.Value = progress;
         }
         else if (on)
         {
             StatusLabel.Text = _loc.GetString("portable-generator-ui-status-running");
-            StatusLabel.SetOnlyStyleClass("Good");
+            StatusLabel.SetOnlyStyleClass("positive");
         }
         else
         {
             StatusLabel.Text = _loc.GetString("portable-generator-ui-status-stopped");
-            StatusLabel.SetOnlyStyleClass("Danger");
+            StatusLabel.SetOnlyStyleClass("highlight");
         }
 
         var canSwitch = _entityManager.TryGetComponent(_entity, out PowerSwitchableComponent? switchable);
@@ -131,7 +131,7 @@ public sealed partial class GeneratorWindow : FancyWindow
                 ("supply", netStats.Supply));
 
             var good = netStats.Load <= netStats.Supply;
-            NetworkStats.SetOnlyStyleClass(good ? "Good" : "Caution");
+            NetworkStats.SetOnlyStyleClass(good ? "positive" : "highlight");
         }
         else
         {
index 982b75117a7bda78d9a74c412d11bfb2c29b51ef..632126ba07b18cd6d90cce21f9f7efe1fbb9a991 100644 (file)
@@ -1,4 +1,4 @@
-<controls:FancyWindow
+<controls:FancyWindow
     xmlns="https://spacestation14.io"
     xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
     MinSize="320 180"
@@ -18,7 +18,7 @@
                 <Label
                     Text="{Loc 'power-charge-window-power'}"
                     HorizontalExpand="True"
-                    StyleClasses="StatusFieldTitle" />
+                    StyleClasses="highlight" />
 
                 <BoxContainer
                     Orientation="Horizontal"
                 <!-- Status -->
                 <Label
                     Text="{Loc 'power-charge-window-status'}"
-                    StyleClasses="StatusFieldTitle" />
+                    StyleClasses="highlight" />
                 <Label Name="StatusLabel"
                     Text="{Loc 'power-charge-window-status-fully-charged'}" />
 
                 <!-- ETA -->
                 <Label
                     Text="{Loc 'power-charge-window-eta'}"
-                    StyleClasses="StatusFieldTitle" />
+                    StyleClasses="highlight" />
                 <Label Name="EtaLabel"
                     Text="N/A" />
 
                 <!-- Charge -->
                 <Label
                     Text="{Loc 'power-charge-window-charge'}"
-                    StyleClasses="StatusFieldTitle" />
+                    StyleClasses="highlight" />
 
                 <ProgressBar Name="ChargeBar"
                     MaxValue="255">
index 6739e24c208452d8bb27632309f61fc6a554a9f0..5423910b7afd4eef99dc7d46d45f28deef9f01c4 100644 (file)
@@ -1,4 +1,5 @@
-using Content.Client.UserInterface.Controls;
+using Content.Client.Stylesheets.Palette;
+using Content.Client.UserInterface.Controls;
 using Content.Shared.Power;
 using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.Controls;
@@ -41,7 +42,10 @@ public sealed partial class PowerChargeWindow : FancyWindow
             ("draw", state.PowerDraw),
             ("max", state.PowerDrawMax));
 
-        PowerLabel.SetOnlyStyleClass(MathHelper.CloseTo(state.PowerDraw, state.PowerDrawMax) ? "Good" : "Caution");
+        PowerLabel.FontColorOverride = MathHelper.CloseTo(state.PowerDraw, state.PowerDrawMax)
+            ? Palettes.Status.Good
+            : Palettes.Status.Warning;
+        // TODO: blend with status colors instead of setting hard values
 
         ChargeBar.Value = state.Charge;
         ChargeText.Text = (state.Charge / 255f).ToString("P0");
@@ -54,12 +58,12 @@ public sealed partial class PowerChargeWindow : FancyWindow
             _ => throw new ArgumentOutOfRangeException()
         });
 
-        StatusLabel.SetOnlyStyleClass(state.PowerStatus switch
+        StatusLabel.FontColorOverride = (state.PowerStatus switch
         {
-            PowerChargePowerStatus.Off => "Danger",
-            PowerChargePowerStatus.Discharging => "Caution",
-            PowerChargePowerStatus.Charging => "Caution",
-            PowerChargePowerStatus.FullyCharged => "Good",
+            PowerChargePowerStatus.Off => Palettes.Status.Critical,
+            PowerChargePowerStatus.Discharging => Palettes.Status.Warning,
+            PowerChargePowerStatus.Charging => Palettes.Status.Warning,
+            PowerChargePowerStatus.FullyCharged => Palettes.Status.Good,
             _ => throw new ArgumentOutOfRangeException()
         });
 
@@ -67,6 +71,6 @@ public sealed partial class PowerChargeWindow : FancyWindow
             ? Loc.GetString("power-charge-window-eta-value", ("left", TimeSpan.FromSeconds(state.EtaSeconds)))
             : Loc.GetString("power-charge-window-eta-none");
 
-        EtaLabel.SetOnlyStyleClass(state.EtaSeconds >= 0 ? "Caution" : "Disabled");
+        EtaLabel.SetOnlyStyleClass(state.EtaSeconds >= 0 ? "highlight" : "LabelWeak");
     }
 }
index 9bab3ad1c998ecf9d66d1863706c2aa40cc64f4a..494e3d16f6a4f08de10323896b86bd3bd9b670f2 100644 (file)
 
                 <!-- Power overview -->
                 <GridContainer Columns="2">
-                    <Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-sources'}"/>
+                    <Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-sources'}"/>
                     <Label Name="TotalSources" Text="?" Margin="10 0 0 0"/>
-                    <Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-battery-usage'}"/>
+                    <Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-battery-usage'}"/>
                     <Label Name="TotalBatteryUsage" Text="?" Margin="10 0 0 0"/>
-                    <Label StyleClasses="StatusFieldTitle" Text="{Loc 'power-monitoring-window-total-loads'}"/>
+                    <Label StyleClasses="highlight" Text="{Loc 'power-monitoring-window-total-loads'}"/>
                     <Label Name="TotalLoads" Text="?" Margin="10 0 0 0"/>
                 </GridContainer>
 
index 209c1cd32bd537bea955b8cdd9299e7fa329ca8d..a9752fa4e27c498b69a61956f16f140e6b91c85b 100644 (file)
@@ -85,10 +85,10 @@ public sealed partial class PowerMonitoringWindow
 
         // Update button style
         if (netEntity == _focusEntity)
-            button.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
+            button.AddStyleClass(StyleClass.Positive);
 
         else
-            button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
+            button.RemoveStyleClass(StyleClass.Positive);
 
         // Update sprite
         if (entry.MetaData.Value.SpritePath != string.Empty && entry.MetaData.Value.SpriteState != string.Empty)
@@ -185,7 +185,7 @@ public sealed partial class PowerMonitoringWindow
         // Toggle off button?
         if (entry.NetEntity == _focusEntity)
         {
-            entry.Button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
+            entry.Button.RemoveStyleClass(StyleClass.Positive);
             _focusEntity = null;
 
             // Request an update from the power monitoring system
@@ -195,7 +195,7 @@ public sealed partial class PowerMonitoringWindow
         }
 
         // Otherwise, toggle on
-        entry.Button.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
+        entry.Button.AddStyleClass(StyleClass.Positive);
 
         ActivateAutoScrollToFocus();
 
@@ -206,7 +206,7 @@ public sealed partial class PowerMonitoringWindow
             {
                 if (sibling.NetEntity == _focusEntity)
                 {
-                    sibling.Button.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
+                    sibling.Button.RemoveStyleClass(StyleClass.Positive);
                     break;
                 }
             }
index af9e46fefafcbd3e1dd856364ac91e4f018840a0..5d673bc8f17b6c144dd9d1a9a0f5609b4bf4684d 100644 (file)
@@ -16,7 +16,7 @@ public sealed class GeigerItemControl : Control
     public GeigerItemControl(GeigerComponent component)
     {
         _component = component;
-        _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+        _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
         AddChild(_label);
 
         Update();
index 94589ecdaabc07fac8ab610e3f198ecb0859f530..91d9667f83fc58db24ca620e9d825844d7466e86 100644 (file)
@@ -18,7 +18,7 @@ public sealed class DoorRemoteStatusControl : Control
     public DoorRemoteStatusControl(Entity<DoorRemoteComponent> entity)
     {
         _entity = entity;
-        _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+        _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
         AddChild(_label);
     }
 
index 8967b948e065c826d0a9abdc497a8eaeec89f245..009360d9ad55b7f18770829f48fcb468b361a66a 100644 (file)
@@ -2,12 +2,12 @@
          xmlns:pllax="clr-namespace:Content.Client.Parallax">
     <pllax:ParallaxControl SpeedX="20"/>
     <Control HorizontalAlignment="Center" VerticalAlignment="Center">
-        <PanelContainer StyleClasses="AngleRect" />
+        <PanelContainer StyleClasses="BackgroundPanel" />
         <BoxContainer Orientation="Vertical" SetSize="800 600" Margin="2">
             <ScrollContainer Name="what" VerticalExpand="True" HScrollEnabled="False" Margin="0 0 0 2" ReturnMeasure="True">
                 <RichTextLabel Name="ReasonLabel" VerticalAlignment="Top" />
             </ScrollContainer>
-            <Button Name="RetryButton" StyleClasses="Caution" Text="{Loc 'replay-loading-retry'}" Visible="False" />
+            <Button Name="RetryButton" StyleClasses="negative" Text="{Loc 'replay-loading-retry'}" Visible="False" />
             <Button Name="CancelButton" Text="{Loc 'replay-loading-cancel'}" Visible="False" />
         </BoxContainer>
     </Control>
index 24583d2776bf3b35e2011d0f994986911cc30523..f9b7b245b22cbb91e3cb3c655cb24076e65ac9db 100644 (file)
@@ -63,7 +63,7 @@ public sealed partial class RoboticsConsoleWindow : FancyWindow
         };
 
         // cant put multiple styles in xaml for some reason
-        DestroyButton.StyleClasses.Add(StyleBase.ButtonCaution);
+        DestroyButton.StyleClasses.Add(StyleClass.Negative);
     }
 
     public void SetEntity(EntityUid uid)
index 7108e4cca8f70a59df9583777926d78fd90b3f97..f0a1678b75abf610b4e1c0e7011b0fb3144b170e 100644 (file)
@@ -34,7 +34,7 @@ namespace Content.Client.RoundEnd
             roundEndTabs.AddChild(MakeRoundEndSummaryTab(gm, roundEnd, roundTimeSpan, roundId));
             roundEndTabs.AddChild(MakePlayerManifestTab(info));
 
-            Contents.AddChild(roundEndTabs);
+            ContentsContainer.AddChild(roundEndTabs);
 
             OpenCenteredRight();
             MoveToFront();
index 7855577e69462e658549fe7fc0b88ab8e79f30aa..004387eeb501e26656bc58f3c044b8737e80c0ed 100644 (file)
@@ -74,12 +74,12 @@ public sealed partial class OfferingWindowOption : PanelContainer
 
             if (_claimed)
             {
-                ClaimButton.AddStyleClass(StyleBase.ButtonCaution);
+                ClaimButton.AddStyleClass(StyleClass.Negative);
                 ClaimButton.Text = Loc.GetString("offering-window-claimed");
             }
             else
             {
-                ClaimButton.RemoveStyleClass(StyleBase.ButtonCaution);
+                ClaimButton.RemoveStyleClass(StyleClass.Negative);
                 ClaimButton.Text = Loc.GetString("offering-window-claim");
             }
         }
index 6eb2944ea9bf7c563ebe909b4eeb0e9a7317f385..34ff5b45c937383b3c777f797bdb11fb1a16bc26 100644 (file)
@@ -90,9 +90,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
             offering.AddContent(new Label
             {
                 Text = difficultyProto.RecommendedPlayers.ToString(),
-                FontColorOverride = StyleNano.NanoGold,
                 HorizontalAlignment = Control.HAlignment.Left,
                 Margin = new Thickness(0f, 0f, 0f, 5f),
+                StyleClasses = { StyleClass.LabelKeyText },
             });
 
             // Details
@@ -108,9 +108,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
                 Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description))
                         ? LogAndReturnDefaultFactionDescription(faction)
                         : Loc.GetString(_protoManager.Index<SalvageFactionPrototype>(faction).Description),
-                FontColorOverride = StyleNano.NanoGold,
                 HorizontalAlignment = Control.HAlignment.Left,
                 Margin = new Thickness(0f, 0f, 0f, 5f),
+                StyleClasses = { StyleClass.LabelKeyText },
             });
 
             string LogAndReturnDefaultFactionDescription(string faction)
@@ -129,9 +129,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
             offering.AddContent(new Label
             {
                 Text = mission.Duration.ToString(),
-                FontColorOverride = StyleNano.NanoGold,
                 HorizontalAlignment = Control.HAlignment.Left,
                 Margin = new Thickness(0f, 0f, 0f, 5f),
+                StyleClasses = { StyleClass.LabelKeyText },
             });
 
             // Biome
@@ -147,9 +147,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
                 Text = string.IsNullOrWhiteSpace(Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description))
                         ? LogAndReturnDefaultBiomDescription(biome)
                         : Loc.GetString(_protoManager.Index<SalvageBiomeModPrototype>(biome).Description),
-                FontColorOverride = StyleNano.NanoGold,
                 HorizontalAlignment = Control.HAlignment.Left,
                 Margin = new Thickness(0f, 0f, 0f, 5f),
+                StyleClasses = { StyleClass.LabelKeyText },
             });
 
             string LogAndReturnDefaultBiomDescription(string biome)
@@ -169,9 +169,9 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
             offering.AddContent(new Label
             {
                 Text = string.Join("\n", mods.Select(o => "- " + o)).TrimEnd(),
-                FontColorOverride = StyleNano.NanoGold,
                 HorizontalAlignment = Control.HAlignment.Left,
                 Margin = new Thickness(0f, 0f, 0f, 5f),
+                StyleClasses = { StyleClass.LabelKeyText },
             });
 
             offering.ClaimPressed += args =>
index e833e7d7a998678205870177c34926e848f87dbf..830bc3ccc5c9212a77db082258e6a6ff8d5df788 100644 (file)
@@ -133,13 +133,13 @@ public sealed partial class SensorMonitoringWindow : FancyWindow, IComputerWindo
 
         foreach (var sensor in _sensorData.Values)
         {
-            var labelName = new Label { Text = sensor.Name, StyleClasses = { StyleBase.StyleClassLabelHeading } };
+            var labelName = new Label { Text = sensor.Name, StyleClasses = { StyleClass.LabelHeading } };
             var labelAddress = new Label
             {
                 Text = sensor.Address,
                 Margin = new Thickness(4, 0),
                 VerticalAlignment = VAlignment.Bottom,
-                StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+                StyleClasses = { StyleClass.LabelWeak }
             };
 
             Asdf.AddChild(new BoxContainer
@@ -163,13 +163,13 @@ public sealed partial class SensorMonitoringWindow : FancyWindow, IComputerWindo
                     Orientation = BoxContainer.LayoutOrientation.Horizontal,
                     Children =
                     {
-                        new Label { Text = stream.Name, StyleClasses = { "monospace" }, HorizontalExpand = true },
+                        new Label { Text = stream.Name, StyleClasses = { "Monospace" }, HorizontalExpand = true },
                         new Label { Text = FormatValue(stream.Unit, lastSample.Value) }
                     }
                 });
 
                 Asdf.AddChild(new GraphView(stream.Samples, startTime, curTime, maxValue * 1.1f, this) { MinHeight = 150 });
-                Asdf.AddChild(new PanelContainer { StyleClasses = { StyleBase.ClassLowDivider } });
+                Asdf.AddChild(new PanelContainer { StyleClasses = { StyleClass.LowDivider } });
             }
         }
     }
index 6ed20de6bde277e33901ba1a353f4bb4cd8caa6a..dab11a7b622704c760b271b171bcedbf0c38ad9a 100644 (file)
@@ -4,13 +4,13 @@
                            MinSize="200 200">
     <BoxContainer Orientation="Vertical" HorizontalExpand="True">
         <GridContainer Margin="4 0 0 0" Columns="2">
-            <Label Name="ShowIFFLabel" Text="{Loc 'iff-console-show-iff-label'}" HorizontalExpand="True" StyleClasses="StatusFieldTitle" />
+            <Label Name="ShowIFFLabel" Text="{Loc 'iff-console-show-iff-label'}" HorizontalExpand="True" StyleClasses="highlight" />
             <BoxContainer Orientation="Horizontal" MinWidth="120">
                 <Button Name="ShowIFFOnButton" Text="{Loc 'iff-console-on'}" StyleClasses="OpenRight" />
                 <Button Name="ShowIFFOffButton" Text="{Loc 'iff-console-off'}" StyleClasses="OpenLeft" />
             </BoxContainer>
 
-            <Label Name="ShowVesselLabel" Text="{Loc 'iff-console-show-vessel-label'}" HorizontalExpand="True" StyleClasses="StatusFieldTitle" />
+            <Label Name="ShowVesselLabel" Text="{Loc 'iff-console-show-vessel-label'}" HorizontalExpand="True" StyleClasses="highlight" />
             <BoxContainer Orientation="Horizontal" MinWidth="120">
                 <Button Name="ShowVesselOnButton" Text="{Loc 'iff-console-on'}" StyleClasses="OpenRight" />
                 <Button Name="ShowVesselOffButton" Text="{Loc 'iff-console-off'}" StyleClasses="OpenLeft" />
index b9e07adef0ba01d0554c9481021d05c21624ca6b..aea590e334f03bc66fd470c3bed2f898e85ec07b 100644 (file)
@@ -102,14 +102,14 @@ public sealed partial class BorgMenu : FancyWindow
             BrainView.Visible = true;
             BrainView.SetEntity(brain);
             BrainButton.Disabled = false;
-            BrainButton.AddStyleClass(StyleBase.ButtonOpenLeft);
+            BrainButton.AddStyleClass(StyleClass.ButtonOpenLeft);
         }
         else
         {
             BrainButton.Text = Loc.GetString("borg-ui-no-brain");
             BrainButton.Disabled = true;
             BrainView.Visible = false;
-            BrainButton.RemoveStyleClass(StyleBase.ButtonOpenLeft);
+            BrainButton.RemoveStyleClass(StyleClass.ButtonOpenLeft);
         }
     }
 
index 7d89cc54b99646a508a09f6c2ebf3c9b064cfb7a..2f6e25f983912e0266d50a31df2f384c5da856bc 100644 (file)
@@ -1,6 +1,6 @@
 <PanelContainer xmlns="https://spacestation14.io"
                 HorizontalExpand="True"
-                StyleClasses="PanelBackgroundLight"
+                StyleClasses="PanelLight"
                 Margin="5 5 5 0">
     <BoxContainer Orientation="Horizontal" HorizontalExpand="True" Margin="5 5 0 5">
         <SpriteView Name="ModuleView" Margin="0 0 5 0"/>
index d8abaf6e996ccbe8c740e54e0bf5e147135512c9..d16aa56664d7f4ca32b84792f10720ee448e4532 100644 (file)
@@ -10,7 +10,7 @@
             <customControls:HSeparator Margin="0 5 0 5"/>
             <RichTextLabel Name="LawLabel"/>
             <BoxContainer Name="LawAnnouncementButtons" Orientation="Horizontal" HorizontalExpand="True" Margin="0 5 0 0">
-                <Label Text="{Loc laws-ui-state-law}" StyleClasses="StatusFieldTitle"/>
+                <Label Text="{Loc laws-ui-state-law}" StyleClasses="highlight"/>
                 <Control Margin="5 0 0 0" />
                 <!-- Buttons are added via C# code-->
             </BoxContainer>
index 788e97bef1685f467361f8c4ab73bcc9cfe04c2f..896f22012a2365a4515f09cea7e3f11ee52f3c90 100644 (file)
@@ -97,7 +97,7 @@ public sealed class SprayPainterSystem : SharedSprayPainterSystem
         public StatusControl(Entity<SprayPainterComponent> ent)
         {
             _entity = ent;
-            _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+            _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
             AddChild(_label);
         }
 
index 80062268322ca8b8f2d43c7c48892d9016b0645d..52941089af601f10761ca41f19f6f0f0215d5968 100644 (file)
@@ -15,7 +15,7 @@ public sealed class StackStatusControl : Control
     public StackStatusControl(StackComponent parent)
     {
         _parent = parent;
-        _label = new RichTextLabel {StyleClasses = {StyleNano.StyleClassItemStatus}};
+        _label = new RichTextLabel {StyleClasses = {StyleClass.ItemStatus}};
         _label.SetMarkup(Loc.GetString("comp-stack-status", ("count", _parent.Count)));
         AddChild(_label);
     }
index 124356e0110df93aeb025fbbee33c32f6c7a2da1..e3fa8277366928deccf2fca0071d70789eda925d 100644 (file)
@@ -17,7 +17,7 @@ namespace Content.Client.Strip
         public StrippingMenu()
         {
             var box = new BoxContainer() { Orientation = LayoutOrientation.Vertical, Margin = new Thickness(0, 8) };
-            Contents.AddChild(box);
+            ContentsContainer.AddChild(box);
             box.AddChild(SnareContainer);
             box.AddChild(HandsContainer);
             box.AddChild(InventoryContainer);
diff --git a/Content.Client/Stylesheets/BaseStylesheet.Fonts.cs b/Content.Client/Stylesheets/BaseStylesheet.Fonts.cs
new file mode 100644 (file)
index 0000000..0b3e4ae
--- /dev/null
@@ -0,0 +1,66 @@
+using Content.Client.Stylesheets.Fonts;
+using Robust.Client.ResourceManagement;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using Robust.Shared.Reflection;
+using Robust.Shared.Sandboxing;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets;
+
+public abstract partial class BaseStylesheet : IStyleResources
+{
+    [Dependency] protected readonly ISandboxHelper SandboxHelper = default!;
+    [Dependency] protected readonly IReflectionManager ReflectionManager = default!;
+    [Dependency] protected internal readonly IResourceCache ResCache = default!;
+
+    public Stylesheet Stylesheet { get; init; }
+
+    public abstract NotoFontFamilyStack BaseFont { get; }
+
+    /// <summary>
+    ///     Get the style rules for the given font stack, with the provided sizes.
+    ///     Does not set the 'default' font, but does create rules for every combination of font kind and font size.
+    ///     This is intended for font sizes you think will be common/generally useful, for less common usecases prefer specifying the font explicitly.
+    /// </summary>
+    /// <param name="prefix">The prefix for the style classes, if any.</param>
+    /// <param name="stack">Font stack to use</param>
+    /// <param name="sizes">A set of styleclasses and the associated size of font to use.</param>
+    /// <returns>A rules list containing all combinations.</returns>
+    /// <remarks>Use <see cref="M:Content.Client.Stylesheets.BaseStylesheet.GetFontClass(Content.Client.Stylesheets.Redux.Fonts.FontStack.FontKind,System.String)"/> to get the appropriate styleclass for a font choice.</remarks>
+    // god xmldoc refs are long ^^^
+    // lmao
+    protected StyleRule[] GetRulesForFont(string? prefix, NotoFontFamilyStack stack, List<(string?, int)> sizes) // TODO: NotoFontFamilyStack is temporary
+    {
+        var rules = new List<StyleRule>();
+
+        foreach (var (name, size) in sizes)
+        {
+            foreach (var kind in stack.AvailableKinds)
+            {
+                var builder = E().Class(GetFontClass(kind, prefix));
+
+                if (name is not null)
+                    builder.Class(name);
+
+                builder.Prop(Label.StylePropertyFont, stack.GetFont(size, kind));
+
+                rules.Add(builder);
+            }
+        }
+
+        return rules.ToArray();
+    }
+
+    /// <summary>
+    ///     Returns the appropriate styleclass for the given font configuration.
+    /// </summary>
+    /// <param name="kind"></param>
+    /// <param name="prefix"></param>
+    /// <returns></returns>
+    public static string GetFontClass(FontKind kind, string? prefix = null)
+    {
+        var kindStr = kind.ToString().ToLowerInvariant();
+        return prefix is null ? $"font-{kindStr}" : $"{prefix}-{kindStr}";
+    }
+}
diff --git a/Content.Client/Stylesheets/BaseStylesheet.Resources.cs b/Content.Client/Stylesheets/BaseStylesheet.Resources.cs
new file mode 100644 (file)
index 0000000..96e260a
--- /dev/null
@@ -0,0 +1,108 @@
+using System.Diagnostics.CodeAnalysis;
+using Robust.Client.ResourceManagement;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets;
+
+public abstract partial class BaseStylesheet
+{
+    /// <summary>
+    ///     The file roots of the stylesheet, dictates where assets get read from for the given type of resource.
+    ///     Roots will be checked in order for assets, avoid having a significant number of them.
+    /// </summary>
+    /// <remarks>
+    ///     Must be a constant, changes to this after construction will not be reflected.
+    /// </remarks>
+    public abstract Dictionary<Type, ResPath[]> Roots { get; }
+
+    /// <summary>
+    ///     Attempts to locate a resource within the stylesheet's roots.
+    /// </summary>
+    /// <param name="target">The relative path of the target resource.</param>
+    /// <param name="resource">The discovered/cached resource, if any.</param>
+    /// <typeparam name="T">Type of the resource to read.</typeparam>
+    /// <returns>Whether <paramref name="resource"/> is null.</returns>
+    public bool TryGetResource<T>(ResPath target, [NotNullWhen(true)] out T? resource)
+        where T : BaseResource, new()
+    {
+        DebugTools.Assert(target.IsRelative,
+            "Target path must be relative. Use ResCache directly if you need an absolute file location.");
+
+        foreach (var root in Roots[typeof(T)])
+        {
+            if (ResCache.TryGetResource(root / target, out resource))
+                return true;
+        }
+
+        resource = null;
+        return false;
+    }
+
+    /// <summary>
+    ///     Retrieves a resource, or throws.
+    /// </summary>
+    /// <param name="target">The relative path of the target resource.</param>
+    /// <typeparam name="T">Type of the resource to read.</typeparam>
+    /// <returns>The retrieved resource</returns>
+    /// <exception cref="MissingStyleResourceException">Thrown if the resource does not exist within the stylesheet's roots.</exception>
+    public T GetResource<T>(ResPath target)
+        where T : BaseResource, new()
+    {
+        if (TryGetResource(target, out T? res))
+            return res;
+
+        throw new MissingStyleResourceException(this, target.ToString());
+    }
+
+    /// <summary>
+    ///     Retrieves a resource, or falls back to the specified root. The resource should be present at the fallback
+    ///     root, or else it throws
+    /// </summary>
+    /// <remarks>
+    ///     This should be used to allow common sheetlets to be generic over multiple stylesheets without forcing other
+    ///     styles to have the resource present, if your sheetlet is stylesheet-specific you should not use this.
+    /// </remarks>
+    /// <param name="target">The relative path of the target resource.</param>
+    /// <param name="fallbackRoot">The root that this resource will always exist at</param>
+    /// <typeparam name="T">Type of the resource to read.</typeparam>
+    /// <returns>The retrieved resource</returns>
+    /// <exception cref="ExpectedResourceException">Thrown if the resource does not exist in the fallback root.</exception>
+    public T GetResourceOr<T>(ResPath target, ResPath fallbackRoot)
+        where T : BaseResource, new()
+    {
+        DebugTools.Assert(fallbackRoot.IsRooted,
+            "Fallback root must be absolute. Roots can be retrieved from the stylesheets.");
+
+        if (!ResCache.TryGetResource(fallbackRoot / target, out T? fallback))
+            throw new ExpectedResourceException(this, target.ToString());
+
+        return TryGetResource(target, out T? res) ? res : fallback;
+    }
+}
+
+/// <summary>
+///     Exception thrown when the never-fail helpers in <see cref="PalettedStylesheet"/> fail to locate a resource.
+/// </summary>
+/// <param name="sheet">The stylesheet </param>
+/// <param name="target"></param>
+public sealed class MissingStyleResourceException(BaseStylesheet sheet, string target) : Exception
+{
+    public override string Message =>
+        $"Failed to find any resource at \"{target}\" for {sheet}. The roots are: {sheet.Roots}";
+
+    public override string? Source => sheet.ToString();
+}
+
+/// <summary>
+///     Exception thrown when the never-fail helpers in <see cref="PalettedStylesheet"/> expect a resource at a location
+///     but do not find it.
+/// </summary>
+/// <param name="sheet">The stylesheet</param>
+/// <param name="target"></param>
+public sealed class ExpectedResourceException(BaseStylesheet sheet, string target) : Exception
+{
+    public override string Message =>
+        $"Failed to find any resource at \"{target}\" for {sheet}, when such a resource was expected.";
+
+    public override string? Source => sheet.ToString();
+}
diff --git a/Content.Client/Stylesheets/BaseStylesheet.Sheetlets.cs b/Content.Client/Stylesheets/BaseStylesheet.Sheetlets.cs
new file mode 100644 (file)
index 0000000..0e219fd
--- /dev/null
@@ -0,0 +1,49 @@
+using Robust.Client.UserInterface;
+
+namespace Content.Client.Stylesheets;
+
+public abstract partial class BaseStylesheet
+{
+    public StyleRule[] GetSheetletRules<TSheetTy>(Type sheetletTy, StylesheetManager man)
+    {
+        Sheetlet<TSheetTy>? sheetlet = null;
+        try
+        {
+            if (sheetletTy.ContainsGenericParameters)
+            {
+                if (SandboxHelper.CreateInstance(sheetletTy.MakeGenericType(typeof(TSheetTy))) is Sheetlet<TSheetTy>
+                    sheetlet1)
+                    sheetlet = sheetlet1;
+            }
+            else if (SandboxHelper.CreateInstance(sheetletTy) is Sheetlet<TSheetTy> sheetlet2)
+            {
+                sheetlet = sheetlet2;
+            }
+        }
+        // thrown when `sheetletTy.MakeGenericType` is given a type that does not satisfy the type constraints of
+        // `sheetletTy`
+        catch (ArgumentException) { }
+
+        if (sheetlet is not null)
+        {
+            man.UnusedSheetlets.Remove(sheetletTy);
+            return sheetlet.GetRules((TSheetTy)(object)this, _config);
+        }
+        else
+            return [];
+    }
+
+    public StyleRule[] GetAllSheetletRules<TSheetTy, TAttrib>(StylesheetManager man)
+        where TAttrib : Attribute
+    {
+        var tys = ReflectionManager.FindTypesWithAttribute<TAttrib>();
+        var rules = new List<StyleRule>();
+
+        foreach (var ty in tys)
+        {
+            rules.AddRange(GetSheetletRules<TSheetTy>(ty, man));
+        }
+
+        return rules.ToArray();
+    }
+}
diff --git a/Content.Client/Stylesheets/BaseStylesheet.Textures.cs b/Content.Client/Stylesheets/BaseStylesheet.Textures.cs
new file mode 100644 (file)
index 0000000..a951d88
--- /dev/null
@@ -0,0 +1,59 @@
+using System.Diagnostics.CodeAnalysis;
+using Robust.Client.Graphics;
+using Robust.Client.ResourceManagement;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets;
+
+public abstract partial class BaseStylesheet
+{
+    #region Texture helpers
+
+    /// <summary>
+    ///     Attempts to locate a texture within the stylesheet's roots.
+    /// </summary>
+    /// <param name="target">The relative path of the target resource.</param>
+    /// <param name="texture">The retrieved texture, if any.</param>
+    /// <returns>Whether <paramref name="texture"/> is null.</returns>
+    public bool TryGetTexture(ResPath target, [NotNullWhen(true)] out Texture? texture)
+    {
+        if (TryGetResource(target, out TextureResource? resource))
+        {
+            texture = resource.Texture;
+            return true;
+        }
+
+        texture = null;
+        return false;
+    }
+
+    /// <summary>
+    ///     Retrieves a texture, or throws.
+    /// </summary>
+    /// <param name="target">The relative path of the target texture.</param>
+    /// <returns>The retrieved texture</returns>
+    /// <exception cref="MissingStyleResourceException">Thrown if the texture does not exist within the stylesheet's roots.</exception>
+    public Texture GetTexture(ResPath target)
+    {
+        return GetResource<TextureResource>(target).Texture;
+    }
+
+    /// <summary>
+    ///     Retrieves a texture, or falls back to the specified root. The resource should be present at the fallback
+    ///     root, or else it throws
+    /// </summary>
+    /// <remarks>
+    ///     This should be used to allow common sheetlets to be generic over multiple stylesheets without forcing other
+    ///     styles to have the resource present, if your sheetlet is stylesheet-specific you should not use this.
+    /// </remarks>
+    /// <param name="target">The relative path of the target texture.</param>
+    /// <param name="fallbackRoot">The root that this resource will always exist at</param>
+    /// <returns>The retrieved texture</returns>
+    /// <exception cref="ExpectedResourceException">Thrown if the texture does not exist in the fallback root.</exception>
+    public Texture GetTextureOr(ResPath target, ResPath fallbackRoot)
+    {
+        return GetResourceOr<TextureResource>(target, fallbackRoot).Texture;
+    }
+
+    #endregion
+}
diff --git a/Content.Client/Stylesheets/BaseStylesheet.cs b/Content.Client/Stylesheets/BaseStylesheet.cs
new file mode 100644 (file)
index 0000000..6c12dfd
--- /dev/null
@@ -0,0 +1,33 @@
+namespace Content.Client.Stylesheets;
+
+public abstract partial class BaseStylesheet
+{
+    /// <summary>
+    ///     The type used to describe a configuration for this stylesheet.
+    ///     This will be constructed and passed into the constructor, and may be used for other things as well.
+    /// </summary>
+    /// <remarks>
+    ///     Must be a constant, changes to this after construction will not be reflected.
+    ///     TODO: this type is currently unused. It can be used to, for example, use user-defined fonts or colors.
+    /// </remarks>
+    public virtual Type StylesheetConfigType => typeof(NoConfig);
+
+    /// <remarks>
+    ///     ex. "Nanotrasen", "System", "Syndicate"
+    /// </remarks>
+    public abstract string StylesheetName { get; }
+
+    public record NoConfig();
+
+    private object _config;
+
+    /// <remarks>
+    ///     This constructor will not access any virtual or abstract properties, so you can set them from your config.
+    /// </remarks>
+    protected BaseStylesheet(object config)
+    {
+        IoCManager.InjectDependencies(this);
+        _config = config;
+        Stylesheet = default!;
+    }
+}
diff --git a/Content.Client/Stylesheets/Colorspace/ColorExtensions.cs b/Content.Client/Stylesheets/Colorspace/ColorExtensions.cs
new file mode 100644 (file)
index 0000000..1a19199
--- /dev/null
@@ -0,0 +1,63 @@
+using System.Numerics;
+using JetBrains.Annotations;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.Colorspace;
+
+[PublicAPI]
+public static class ColorExtensions
+{
+    /// <summary>
+    ///     Adjusts the lightness of a color using the Oklab color space.
+    /// </summary>
+    public static Color WithLightness(this Color c, float lightness)
+    {
+        DebugTools.Assert(lightness is >= 0.0f and <= 1.0f);
+
+        var oklab = Color.ToLab(c);
+        oklab.X = lightness;
+
+        return Color.FromLab(oklab);
+    }
+
+    /// <summary>
+    ///     Nudges the lightness (in OKLAB space) of <see cref="c" /> by <see cref="lightnessShift"/> / 100 units
+    /// </summary>
+    public static Color NudgeLightness(this Color c, float lightnessShift)
+    {
+        var oklab = Color.ToLab(c);
+        oklab.X = Math.Clamp(oklab.X + lightnessShift, 0, 1);
+
+        return Color.FromLab(oklab);
+    }
+
+    /// <summary>
+    ///     Nudges the chroma (in OKLCH space) of <see cref="c"/> by <see cref="chromaShift"/> / 100 units
+    /// </summary>
+    /// <remarks>
+    ///     Referenced from https://github.com/jonathantneal/convert-colors/blob/master/src/lab-lch.js
+    /// </remarks>
+    public static Color NudgeChroma(this Color c, float chromaShift)
+    {
+        var oklab = Color.ToLab(c);
+        var oklch = Color.ToLch(oklab);
+
+        oklch.Y = Math.Clamp(oklch.Y + chromaShift, 0, 1);
+
+        return Color.FromLab(Color.FromLch(oklch));
+    }
+
+    /// <summary>
+    ///     Blends two colors in the Oklab color space.
+    /// </summary>
+    public static Color OkBlend(this Color from, Color to, float factor)
+    {
+        DebugTools.Assert(factor is >= 0.0f and <= 1.0f);
+
+        var okFrom = Color.ToLab(from);
+        var okTo = Color.ToLab(to);
+
+        var blended = Vector4.Lerp(okFrom, okTo, factor);
+        return Color.FromLab(blended);
+    }
+}
diff --git a/Content.Client/Stylesheets/CommonSheetletAttribute.cs b/Content.Client/Stylesheets/CommonSheetletAttribute.cs
new file mode 100644 (file)
index 0000000..1fdf78a
--- /dev/null
@@ -0,0 +1,13 @@
+using JetBrains.Annotations;
+
+namespace Content.Client.Stylesheets;
+
+/// <summary>
+///     Attribute used to mark a sheetlet class. Stylesheets can use this attribute to locate and load sheetlets.
+/// </summary>
+[PublicAPI]
+[MeansImplicitUse]
+public sealed class CommonSheetletAttribute : Attribute
+{
+
+}
diff --git a/Content.Client/Stylesheets/CommonStylesheet.cs b/Content.Client/Stylesheets/CommonStylesheet.cs
new file mode 100644 (file)
index 0000000..671ce0b
--- /dev/null
@@ -0,0 +1,70 @@
+using Content.Client.Stylesheets.Palette;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets;
+
+public abstract class CommonStylesheet : PalettedStylesheet, IButtonConfig, IWindowConfig, IIconConfig, ITabContainerConfig,
+    ISliderConfig, IRadialMenuConfig, IPlaceholderConfig, ITooltipConfig, IPanelConfig, INanoHeadingConfig,
+    ILineEditConfig, IStripebackConfig, ICheckboxConfig
+{
+    /// <remarks>
+    ///     This constructor will not access any virtual or abstract properties, so you can set them from your config.
+    /// </remarks>
+    protected CommonStylesheet(object config) : base(config) { }
+
+    ResPath ICheckboxConfig.CheckboxUncheckedPath => new("checkbox_unchecked.svg.96dpi.png");
+    ResPath ICheckboxConfig.CheckboxCheckedPath => new("checkbox_checked.svg.96dpi.png");
+
+    ResPath IStripebackConfig.StripebackPath => new("stripeback.svg.96dpi.png");
+
+    ResPath INanoHeadingConfig.NanoHeadingPath => new("nanoheading.svg.96dpi.png");
+
+    ResPath ILineEditConfig.LineEditPath => new("lineedit.png");
+
+    ResPath IPanelConfig.GeometricPanelBorderPath => new("geometric_panel_border.svg.96dpi.png");
+    ResPath IPanelConfig.BlackPanelDarkThinBorderPath => new("black_panel_dark_thin_border.png");
+
+    ResPath ITooltipConfig.TooltipBoxPath => new("tooltip.png");
+    ResPath ITooltipConfig.WhisperBoxPath => new("whisper.png");
+
+    ResPath IPlaceholderConfig.PlaceholderPath => new("placeholder.png");
+
+    ResPath IRadialMenuConfig.ButtonNormalPath => new("Radial/button_normal.png");
+    ResPath IRadialMenuConfig.ButtonHoverPath => new("Radial/button_hover.png");
+    ResPath IRadialMenuConfig.CloseNormalPath => new("Radial/close_normal.png");
+    ResPath IRadialMenuConfig.CloseHoverPath => new("Radial/close_hover.png");
+    ResPath IRadialMenuConfig.BackNormalPath => new("Radial/back_normal.png");
+    ResPath IRadialMenuConfig.BackHoverPath => new("Radial/back_hover.png");
+
+    ResPath ISliderConfig.SliderFillPath => new("slider_fill.svg.96dpi.png");
+
+    ResPath ISliderConfig.SliderOutlinePath => new("slider_outline.svg.96dpi.png");
+
+    ResPath ISliderConfig.SliderGrabber => new("slider_grabber.svg.96dpi.png");
+
+
+    ResPath ITabContainerConfig.TabContainerPanelPath => new("tabcontainer_panel.png");
+
+    ResPath IIconConfig.HelpIconPath => new("help.png");
+    ResPath IIconConfig.CrossIconPath => new("cross.svg.png");
+    ResPath IIconConfig.InvertedTriangleIconPath => new("inverted_triangle.svg.png");
+
+    ResPath IWindowConfig.WindowHeaderTexturePath => new("window_header.png");
+    ResPath IWindowConfig.WindowHeaderAlertTexturePath => new("window_header_alert.png");
+    ResPath IWindowConfig.WindowBackgroundPath => new("window_background.png");
+    ResPath IWindowConfig.WindowBackgroundBorderedPath => new("window_background_bordered.png");
+    ResPath IWindowConfig.TransparentWindowBackgroundBorderedPath => new("transparent_window_background_bordered.png");
+
+    ResPath IButtonConfig.BaseButtonPath => new("button.svg.96dpi.png");
+    ResPath IButtonConfig.OpenLeftButtonPath => new("button.svg.96dpi.png");
+    ResPath IButtonConfig.OpenRightButtonPath => new("button.svg.96dpi.png");
+    ResPath IButtonConfig.OpenBothButtonPath => new("button.svg.96dpi.png");
+    ResPath IButtonConfig.SmallButtonPath => new("button_small.svg.96dpi.png");
+    ResPath IButtonConfig.RoundedButtonPath => new("rounded_button.svg.96dpi.png");
+    ResPath IButtonConfig.RoundedButtonBorderedPath => new("rounded_button_bordered.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/Fonts/FontKind.cs b/Content.Client/Stylesheets/Fonts/FontKind.cs
new file mode 100644 (file)
index 0000000..fef2b6b
--- /dev/null
@@ -0,0 +1,57 @@
+namespace Content.Client.Stylesheets.Fonts;
+
+/// <summary>
+///     The available kinds of font.
+/// </summary>
+public enum FontKind
+{
+    Regular,
+    Bold,
+    Italic,
+    BoldItalic,
+}
+
+public static class FontKindExtensions
+{
+    internal static string AsFileName(this FontKind kind)
+    {
+        return kind switch
+        {
+            FontKind.Regular => "Regular",
+            FontKind.Bold => "Bold",
+            FontKind.Italic => "Italic",
+            FontKind.BoldItalic => "BoldItalic",
+            _ => throw new ArgumentOutOfRangeException(nameof(kind), kind, null),
+        };
+    }
+
+    internal static bool IsBold(this FontKind kind)
+    {
+        return kind is FontKind.Bold or FontKind.BoldItalic;
+    }
+
+    internal static bool IsItalic(this FontKind kind)
+    {
+        return kind is FontKind.Italic or FontKind.BoldItalic;
+    }
+
+    internal static FontKind SimplifyCompound(this FontKind kind)
+    {
+        return kind switch
+        {
+            FontKind.BoldItalic => FontKind.Bold,
+            _ => kind,
+        };
+    }
+
+
+    internal static FontKind RegularOr(this FontKind kind, FontKind other)
+    {
+        return kind switch
+        {
+            FontKind.Regular => FontKind.Regular,
+            _ => other,
+        };
+    }
+}
+
diff --git a/Content.Client/Stylesheets/Fonts/NotoFontFamilyStack.cs b/Content.Client/Stylesheets/Fonts/NotoFontFamilyStack.cs
new file mode 100644 (file)
index 0000000..9239e5d
--- /dev/null
@@ -0,0 +1,90 @@
+using Content.Client.Resources;
+using JetBrains.Annotations;
+using Robust.Client.Graphics;
+using Robust.Client.ResourceManagement;
+
+namespace Content.Client.Stylesheets.Fonts;
+
+/// <summary>
+///     This class should have a base type. The whole font system is currently kind of bad and completely temporary.
+///     This class is just here because it does sort of work.
+///     TODO: fix (once engine support is added for font properties?)
+/// </summary>
+/// <param name="resCache"></param>
+/// <param name="variant"></param>
+[PublicAPI]
+public sealed class NotoFontFamilyStack(IResourceCache resCache, string variant = "")
+{
+    /// <summary>
+    ///     The primary font path, with string substitution markers.
+    /// </summary>
+    /// <remarks>
+    ///     If using the default GetFontPaths function, the substitutions are as follows:
+    ///     0 is the font kind.
+    ///     1 is the font kind with BoldItalic replaced with Bold when it occurs.
+    /// </remarks>
+    private string _fontPrimary = $"/Fonts/NotoSans{variant}/NotoSans{variant}-{{0}}.ttf";
+
+    /// <summary>
+    ///     The symbols font path, with string substitution markers.
+    /// </summary>
+    /// <remarks>
+    ///     If using the default GetFontPaths function, the substitutions are as follows:
+    ///     0 is the font kind.
+    ///     1 is the font kind with BoldItalic replaced with Bold when it occurs.
+    /// </remarks>
+    private string _fontSymbols = "/Fonts/NotoSans/NotoSansSymbols-{2}.ttf";
+
+    /// <summary>
+    ///     The fallback font path, exactly. (no string substitutions.)
+    /// </summary>
+    private string[] _extras = new[] { "/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf" };
+
+    public HashSet<FontKind> AvailableKinds = [FontKind.Regular, FontKind.Bold, FontKind.Italic, FontKind.BoldItalic];
+
+    /// <summary>
+    ///     This should return the paths of every font in this stack given the abstract members.
+    /// </summary>
+    /// <param name="kind">Which font kind to use.</param>
+    /// <returns>An array of </returns>
+    private string[] GetFontPaths(FontKind kind)
+    {
+        if (!AvailableKinds.Contains(kind))
+        {
+            if (kind == FontKind.BoldItalic && AvailableKinds.Contains(FontKind.Bold))
+            {
+                kind = FontKind.Bold;
+            }
+            else
+            {
+                kind = FontKind.Regular;
+            }
+        }
+
+        var simpleKindStr = kind.SimplifyCompound().AsFileName();
+        var boldOrRegularStr = kind.RegularOr(FontKind.Bold).AsFileName();
+
+        var kindStr = kind.AsFileName();
+        var fontList = new List<string>()
+        {
+            string.Format(_fontPrimary, kindStr, simpleKindStr, boldOrRegularStr),
+            string.Format(_fontSymbols, kindStr, simpleKindStr, boldOrRegularStr),
+        };
+        fontList.AddRange(_extras);
+        return fontList.ToArray();
+    }
+
+    /// <summary>
+    ///     Retrieves an in-style font, of the provided size and kind.
+    /// </summary>
+    /// <param name="size">Size of the font to provide.</param>
+    /// <param name="kind">Optional font kind. Defaults to Regular.</param>
+    /// <returns>A Font resource.</returns>
+    public Font GetFont(int size, FontKind kind = FontKind.Regular)
+    {
+        //ALDebugTools.AssertContains(AvailableKinds, kind);
+        var paths = GetFontPaths(kind);
+
+        return resCache.GetFont(paths, size);
+    }
+}
diff --git a/Content.Client/Stylesheets/ISheetletConfig.cs b/Content.Client/Stylesheets/ISheetletConfig.cs
new file mode 100644 (file)
index 0000000..277006c
--- /dev/null
@@ -0,0 +1,6 @@
+namespace Content.Client.Stylesheets;
+
+public interface ISheetletConfig : IStyleResources
+{
+    // For access.
+}
diff --git a/Content.Client/Stylesheets/IStyleResources.cs b/Content.Client/Stylesheets/IStyleResources.cs
new file mode 100644 (file)
index 0000000..ed842ac
--- /dev/null
@@ -0,0 +1,84 @@
+using System.Diagnostics.CodeAnalysis;
+using Robust.Client.Graphics;
+using Robust.Client.ResourceManagement;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets;
+
+public interface IStyleResources
+{
+    /// <summary>
+    ///     The file roots of the stylesheet, dictates where assets get read from for the given type of resource.
+    ///     Roots will be checked in order for assets, avoid having a significant number of them.
+    /// </summary>
+    /// <remarks>
+    ///     Must be a constant, changes to this after construction will not be reflected.
+    /// </remarks>
+    Dictionary<Type, ResPath[]> Roots { get; }
+
+    /// <summary>
+    ///     Attempts to locate a resource within the stylesheet's roots.
+    /// </summary>
+    /// <param name="target">The relative path of the target resource.</param>
+    /// <param name="resource">The discovered/cached resource, if any.</param>
+    /// <typeparam name="T">Type of the resource to read.</typeparam>
+    /// <returns>Whether <paramref name="resource"/> is null.</returns>
+    bool TryGetResource<T>(ResPath target, [NotNullWhen(true)] out T? resource)
+        where T : BaseResource, new();
+
+    /// <summary>
+    ///     Retrieves a resource, or throws.
+    /// </summary>
+    /// <param name="target">The relative path of the target resource.</param>
+    /// <typeparam name="T">Type of the resource to read.</typeparam>
+    /// <returns>The retrieved resource</returns>
+    /// <exception cref="MissingStyleResourceException">Thrown if the resource does not exist within the stylesheet's roots.</exception>
+    T GetResource<T>(ResPath target)
+        where T : BaseResource, new();
+
+    /// <summary>
+    ///     Retrieves a resource, or falls back to the specified root. The resource should be present at the fallback
+    ///     root, or else it throws
+    /// </summary>
+    /// <remarks>
+    ///     This should be used to allow common sheetlets to be generic over multiple stylesheets without forcing other
+    ///     styles to have the resource present, if your sheetlet is stylesheet-specific you should not use this.
+    /// </remarks>
+    /// <param name="target">The relative path of the target resource.</param>
+    /// <param name="fallbackRoot">The root that this resource will always exist at</param>
+    /// <typeparam name="T">Type of the resource to read.</typeparam>
+    /// <returns>The retrieved resource</returns>
+    /// <exception cref="ExpectedResourceException">Thrown if the resource does not exist in the fallback root.</exception>
+    T GetResourceOr<T>(ResPath target, ResPath fallbackRoot)
+        where T : BaseResource, new();
+
+    /// <summary>
+    ///     Attempts to locate a texture within the stylesheet's roots.
+    /// </summary>
+    /// <param name="target">The relative path of the target resource.</param>
+    /// <param name="texture">The retrieved texture, if any.</param>
+    /// <returns>Whether <paramref name="texture"/> is null.</returns>
+    bool TryGetTexture(ResPath target, [NotNullWhen(true)] out Texture? texture);
+
+    /// <summary>
+    ///     Retrieves a texture, or throws.
+    /// </summary>
+    /// <param name="target">The relative path of the target texture.</param>
+    /// <returns>The retrieved texture</returns>
+    /// <exception cref="MissingStyleResourceException">Thrown if the texture does not exist within the stylesheet's roots.</exception>
+    Texture GetTexture(ResPath target);
+
+    /// <summary>
+    ///     Retrieves a texture, or falls back to the specified root. The resource should be present at the fallback
+    ///     root, or else it throws
+    /// </summary>
+    /// <remarks>
+    ///     This should be used to allow common sheetlets to be generic over multiple stylesheets without forcing other
+    ///     styles to have the resource present, if your sheetlet is stylesheet-specific you should not use this.
+    /// </remarks>
+    /// <param name="target">The relative path of the target texture.</param>
+    /// <param name="fallbackRoot">The root that this resource will always exist at</param>
+    /// <returns>The retrieved texture</returns>
+    /// <exception cref="ExpectedResourceException">Thrown if the texture does not exist in the fallback root.</exception>
+    Texture GetTextureOr(ResPath target, ResPath fallbackRoot);
+}
index 134c7fd3bec21b37b333a4d3b39f9b70f9639398..2fa795a9dea0b1f3cf9e623e74ae340eb146970f 100644 (file)
@@ -1,12 +1,32 @@
+using System.Diagnostics.CodeAnalysis;
 using Robust.Client.UserInterface;
 
-namespace Content.Client.Stylesheets
+namespace Content.Client.Stylesheets;
+
+public interface IStylesheetManager
 {
-    public interface IStylesheetManager
-    {
-        Stylesheet SheetNano { get; }
-        Stylesheet SheetSpace { get; }
+    /// Nanotrasen styles: the default style! Use this for most UIs
+    Stylesheet SheetNanotrasen { get; }
+
+    ///
+    /// System styles: use this for any admin / debug menus, and any odds and ends (like the changelog for some reason)
+    ///
+    Stylesheet SheetSystem { get; }
+
+
+    [Obsolete("Update to use SheetNanotrasen instead")]
+    Stylesheet SheetNano { get; }
+
+    [Obsolete("Update to use SheetSystem instead")]
+    Stylesheet SheetSpace { get; }
+
+    /// get a stylesheet by name
+    public bool TryGetStylesheet(string name, [MaybeNullWhen(false)]  out Stylesheet stylesheet);
+
+    void Initialize();
 
-        void Initialize();
-    }
+    ///
+    /// Sheetlets marked with CommonSheetlet that have not satisfied the type constraints of any stylesheet
+    ///
+    public HashSet<Type> UnusedSheetlets { get; }
 }
diff --git a/Content.Client/Stylesheets/NTSheetlets/NanoHeadingSheetlet.cs b/Content.Client/Stylesheets/NTSheetlets/NanoHeadingSheetlet.cs
new file mode 100644 (file)
index 0000000..fb6d37a
--- /dev/null
@@ -0,0 +1,36 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Content.Client.UserInterface.Controls;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.NTSheetlets;
+
+/// Not NTHeading because NanoHeading is the name of the element
+[CommonSheetlet]
+public sealed class NanoHeadingSheetlet : Sheetlet<NanotrasenStylesheet>
+{
+    public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
+    {
+        INanoHeadingConfig nanoHeadingCfg = sheet;
+
+        var nanoHeadingTex = sheet.GetTexture(nanoHeadingCfg.NanoHeadingPath);
+        var nanoHeadingBox = new StyleBoxTexture
+        {
+            Texture = nanoHeadingTex,
+            PatchMarginRight = 10,
+            PatchMarginTop = 10,
+            ContentMarginTopOverride = 2,
+            ContentMarginLeftOverride = 10,
+            PaddingTop = 4,
+        };
+        nanoHeadingBox.SetPatchMargin(StyleBox.Margin.Left | StyleBox.Margin.Bottom, 2);
+
+        return
+        [
+            E<NanoHeading>().ParentOf(E<PanelContainer>()).Panel(nanoHeadingBox),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Palette/ColorPalette.cs b/Content.Client/Stylesheets/Palette/ColorPalette.cs
new file mode 100644 (file)
index 0000000..89405e6
--- /dev/null
@@ -0,0 +1,81 @@
+using Content.Client.Stylesheets.Colorspace;
+
+// ReSharper disable MemberCanBePrivate.Global
+
+namespace Content.Client.Stylesheets.Palette;
+
+/// <remarks>
+///     Don't be afraid to add a lot of fields here! This class is made for readability.
+/// </remarks>
+public record ColorPalette(
+    Color Base,
+
+    float LightnessShift,
+    float ChromaShift,
+
+    Color Element,
+    Color HoveredElement,
+    Color PressedElement,
+    Color DisabledElement,
+
+    Color Background,
+    Color BackgroundLight,
+    Color BackgroundDark,
+
+    Color Text,
+    Color TextDark
+)
+{
+    /// <summary>
+    /// Helper method for generating a ColorPalette from a specified base hex string, with the
+    /// option to override specific parts of the palette
+    /// </summary>
+    public static ColorPalette FromHexBase(
+        string hex,
+        float lightnessShift = 0.06f,
+        float chromaShift = 0.00f,
+        Color? element = null,
+        Color? background = null,
+        Color? text = null
+    )
+    {
+        var @base = Color.FromHex(hex);
+
+        element ??= Shift(@base, lightnessShift, chromaShift, -1); //                        Shift(@base, -1)
+        var hoveredElement = Shift(element.Value, lightnessShift, chromaShift, 1); //        Shift(@base,  0)
+        var pressedElement = Shift(element.Value, lightnessShift, chromaShift, -1); //       Shift(@base, -2)
+        var disabledElement = Shift(element.Value, lightnessShift, chromaShift, -2) //       Shift(@base, -3)
+            .NudgeChroma(-chromaShift * 2);
+
+        background ??= Shift(@base, lightnessShift, chromaShift, -3); //                     Shift(@base, -3)
+        var backgroundLight = Shift(background.Value, lightnessShift, chromaShift, 1); //    Shift(@base, -2)
+        var backgroundDark = Shift(background.Value, lightnessShift, chromaShift, -1); //    Shift(@base, -4)
+
+        text ??= @base; //                                                                   Shift(@base,  0)
+        var textDark = Shift(text.Value, lightnessShift, chromaShift, -1); //                Shift(@base, -1)
+
+        return new ColorPalette(
+            Base: @base,
+
+            LightnessShift: lightnessShift,
+            ChromaShift: chromaShift,
+
+            Element: element.Value,
+            HoveredElement: hoveredElement,
+            PressedElement: pressedElement,
+            DisabledElement: disabledElement,
+
+            Background: background.Value,
+            BackgroundLight: backgroundLight,
+            BackgroundDark: backgroundDark,
+
+            Text: text.Value,
+            TextDark: textDark
+        );
+    }
+
+    private static Color Shift(Color from, float lightnessShift, float chromaShift, float factor)
+    {
+        return from.NudgeLightness(lightnessShift * factor).NudgeChroma(chromaShift * factor);
+    }
+}
diff --git a/Content.Client/Stylesheets/Palette/Palettes.cs b/Content.Client/Stylesheets/Palette/Palettes.cs
new file mode 100644 (file)
index 0000000..aab61ac
--- /dev/null
@@ -0,0 +1,30 @@
+namespace Content.Client.Stylesheets.Palette;
+
+/// <summary>
+///     Stores all style palettes in one accessible location
+/// </summary>
+/// <remarks>
+///     Technically not limited to only colors, can store like, standard padding amounts, and font sizes, maybe?
+/// </remarks>
+public static class Palettes
+{
+    // muted tones
+    public static readonly ColorPalette Navy = ColorPalette.FromHexBase("#4f5376", lightnessShift: 0.05f, chromaShift: 0.0045f);
+    public static readonly ColorPalette Cyan = ColorPalette.FromHexBase("#42586a", lightnessShift: 0.05f, chromaShift: 0.0045f);
+    public static readonly ColorPalette Slate = ColorPalette.FromHexBase("#545562");
+    public static readonly ColorPalette Neutral = ColorPalette.FromHexBase("#555555");
+
+    // status tones
+    public static readonly ColorPalette Red = ColorPalette.FromHexBase("#b62124", chromaShift: 0.02f);
+    public static readonly ColorPalette Amber = ColorPalette.FromHexBase("#c18e36");
+    public static readonly ColorPalette Green = ColorPalette.FromHexBase("#3c854a");
+    public static readonly StatusPalette Status = new([Red.Base, Amber.Base, Green.Base]);
+
+    // highlight tones
+    public static readonly ColorPalette Gold = ColorPalette.FromHexBase("#a88b5e");
+    public static readonly ColorPalette Maroon = ColorPalette.FromHexBase("#9b2236");
+
+    // Intended to be used with `ModulateSelf` to darken / lighten something
+    public static readonly ColorPalette AlphaModulate = ColorPalette.FromHexBase("#ffffff");
+
+}
diff --git a/Content.Client/Stylesheets/Palette/StatusPalette.cs b/Content.Client/Stylesheets/Palette/StatusPalette.cs
new file mode 100644 (file)
index 0000000..f2b19cf
--- /dev/null
@@ -0,0 +1,57 @@
+using Content.Client.Stylesheets.Colorspace;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.Palette;
+
+public sealed class StatusPalette
+{
+    /// The status colors to blend between, these are equally spaced from 0 to 1 with 0 being StatusColors[0], and 1 being
+    /// StatusColors.Last()
+    ///
+    /// Traditionally, something like { Red, Yellow, Green }
+    public readonly Color[] StatusColors;
+
+    /// <code>StatusPalette.GetStatusColor(1.0f)</code>
+    public readonly Color Good;
+    /// <code>StatusPalette.GetStatusColor(0.75f)</code>
+    public readonly Color Okay;
+    /// <code>StatusPalette.GetStatusColor(0.5f)</code>
+    public readonly Color Warning;
+    /// <code>StatusPalette.GetStatusColor(0.25f)</code>
+    public readonly Color Bad;
+    /// <code>StatusPalette.GetStatusColor(0.0f)</code>
+    public readonly Color Critical;
+
+    public StatusPalette(Color[] statusColors)
+    {
+        StatusColors = statusColors;
+        Good = GetStatusColor(1.0f);
+        Okay = GetStatusColor(0.75f);
+        Warning = GetStatusColor(0.5f);
+        Bad = GetStatusColor(0.25f);
+        Critical = GetStatusColor(0.0f);
+    }
+
+    /// <param name="factor">The severity of this status from 0 to 1. Traditionally, 1 will be green and 0 red</param>
+    /// <returns>The color for this status, linearly Oklab blended between equal intervals of the colors in StatusColor</returns>
+    public Color GetStatusColor(float factor)
+    {
+        DebugTools.Assert(factor >= 0.0 && factor <= 1.0);
+        DebugTools.Assert(StatusColors.Length >= 1);
+
+        if (StatusColors.Length == 1)
+            return StatusColors[0];
+
+        var intervals = StatusColors.Length - 1;
+
+        var fromIdx = (int) Math.Floor(factor * intervals);
+        if (factor is 1.0f or 0.0f)
+            return StatusColors[fromIdx];
+
+        var from = StatusColors[fromIdx];
+        var to = StatusColors[fromIdx + 1];
+        var f = (factor - (float) fromIdx / intervals) * intervals;
+
+        return from.OkBlend(to, f);
+    }
+}
diff --git a/Content.Client/Stylesheets/PalettedStylesheet.Palettes.cs b/Content.Client/Stylesheets/PalettedStylesheet.Palettes.cs
new file mode 100644 (file)
index 0000000..e8fe717
--- /dev/null
@@ -0,0 +1,12 @@
+using Content.Client.Stylesheets.Palette;
+
+namespace Content.Client.Stylesheets;
+
+public abstract partial class PalettedStylesheet
+{
+    public abstract ColorPalette PrimaryPalette { get; }
+    public abstract ColorPalette SecondaryPalette { get; }
+    public abstract ColorPalette PositivePalette { get; }
+    public abstract ColorPalette NegativePalette { get; }
+    public abstract ColorPalette HighlightPalette { get; }
+}
diff --git a/Content.Client/Stylesheets/PalettedStylesheet.cs b/Content.Client/Stylesheets/PalettedStylesheet.cs
new file mode 100644 (file)
index 0000000..682a50c
--- /dev/null
@@ -0,0 +1,14 @@
+using JetBrains.Annotations;
+
+namespace Content.Client.Stylesheets;
+
+/// <summary>
+///     The base class for all stylesheets, providing core functionality and helpers.
+/// </summary>
+[PublicAPI]
+public abstract partial class PalettedStylesheet : BaseStylesheet
+{
+    protected PalettedStylesheet(object config) : base(config)
+    {
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlet.cs b/Content.Client/Stylesheets/Sheetlet.cs
new file mode 100644 (file)
index 0000000..7f55b5a
--- /dev/null
@@ -0,0 +1,16 @@
+using Robust.Client.ResourceManagement;
+using Robust.Client.UserInterface;
+
+namespace Content.Client.Stylesheets;
+
+public abstract class Sheetlet<T>
+{
+    [Dependency] protected readonly IResourceCache ResCache = default!;
+
+    protected Sheetlet()
+    {
+        IoCManager.InjectDependencies(this);
+    }
+
+    public abstract StyleRule[] GetRules(T sheet, object config);
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/IButtonConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/IButtonConfig.cs
new file mode 100644 (file)
index 0000000..3dc8f07
--- /dev/null
@@ -0,0 +1,19 @@
+using Content.Client.Stylesheets.Palette;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface IButtonConfig : ISheetletConfig
+{
+    public ResPath BaseButtonPath { get; }
+    public ResPath OpenLeftButtonPath { get; }
+    public ResPath OpenRightButtonPath { get; }
+    public ResPath OpenBothButtonPath { get; }
+    public ResPath SmallButtonPath { get; }
+    public ResPath RoundedButtonPath { get; }
+    public ResPath RoundedButtonBorderedPath { get; }
+
+    public ColorPalette ButtonPalette { get; }
+    public ColorPalette PositiveButtonPalette { get; }
+    public ColorPalette NegativeButtonPalette { get; }
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/ICheckboxConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/ICheckboxConfig.cs
new file mode 100644 (file)
index 0000000..1f3e54c
--- /dev/null
@@ -0,0 +1,10 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface ICheckboxConfig
+{
+    public ResPath CheckboxUncheckedPath { get; }
+    public ResPath CheckboxCheckedPath { get; }
+}
+
diff --git a/Content.Client/Stylesheets/SheetletConfigs/IIconConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/IIconConfig.cs
new file mode 100644 (file)
index 0000000..b7ab56c
--- /dev/null
@@ -0,0 +1,12 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface IIconConfig : ISheetletConfig
+{
+    public ResPath HelpIconPath { get; }
+    public ResPath CrossIconPath { get; }
+    public ResPath InvertedTriangleIconPath { get; }
+
+
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/ILineEditConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/ILineEditConfig.cs
new file mode 100644 (file)
index 0000000..1054091
--- /dev/null
@@ -0,0 +1,8 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface ILineEditConfig : ISheetletConfig
+{
+    public ResPath LineEditPath { get; }
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/INanoHeadingConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/INanoHeadingConfig.cs
new file mode 100644 (file)
index 0000000..4804c1a
--- /dev/null
@@ -0,0 +1,9 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface INanoHeadingConfig : ISheetletConfig
+{
+    public ResPath NanoHeadingPath { get;  }
+}
+
diff --git a/Content.Client/Stylesheets/SheetletConfigs/IPanelConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/IPanelConfig.cs
new file mode 100644 (file)
index 0000000..6e12a75
--- /dev/null
@@ -0,0 +1,9 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface IPanelConfig : ISheetletConfig
+{
+    public ResPath GeometricPanelBorderPath { get; }
+    public ResPath BlackPanelDarkThinBorderPath { get; }
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/IPlaceholderConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/IPlaceholderConfig.cs
new file mode 100644 (file)
index 0000000..81dd6e3
--- /dev/null
@@ -0,0 +1,9 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface IPlaceholderConfig : ISheetletConfig
+{
+    public ResPath PlaceholderPath { get; }
+}
+
diff --git a/Content.Client/Stylesheets/SheetletConfigs/IRadialMenuConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/IRadialMenuConfig.cs
new file mode 100644 (file)
index 0000000..6cd142d
--- /dev/null
@@ -0,0 +1,13 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface IRadialMenuConfig : ISheetletConfig
+{
+    public ResPath ButtonNormalPath { get; }
+    public ResPath ButtonHoverPath { get; }
+    public ResPath CloseNormalPath { get; }
+    public ResPath CloseHoverPath { get; }
+    public ResPath BackNormalPath { get; }
+    public ResPath BackHoverPath { get; }
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/ISliderConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/ISliderConfig.cs
new file mode 100644 (file)
index 0000000..037fb4e
--- /dev/null
@@ -0,0 +1,10 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface ISliderConfig : ISheetletConfig
+{
+    public ResPath SliderFillPath { get; }
+    public ResPath SliderOutlinePath { get; }
+    public ResPath SliderGrabber { get; }
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/IStripebackConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/IStripebackConfig.cs
new file mode 100644 (file)
index 0000000..90b3daf
--- /dev/null
@@ -0,0 +1,8 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface IStripebackConfig : ISheetletConfig
+{
+    public ResPath StripebackPath { get; }
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/ITabContainerConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/ITabContainerConfig.cs
new file mode 100644 (file)
index 0000000..bfd33d9
--- /dev/null
@@ -0,0 +1,8 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface ITabContainerConfig : ISheetletConfig
+{
+    public ResPath TabContainerPanelPath { get; }
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/ITooltipConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/ITooltipConfig.cs
new file mode 100644 (file)
index 0000000..eef4e7f
--- /dev/null
@@ -0,0 +1,9 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface ITooltipConfig : ISheetletConfig
+{
+    public ResPath TooltipBoxPath { get; }
+    public ResPath WhisperBoxPath { get; }
+}
diff --git a/Content.Client/Stylesheets/SheetletConfigs/IWindowConfig.cs b/Content.Client/Stylesheets/SheetletConfigs/IWindowConfig.cs
new file mode 100644 (file)
index 0000000..669d2ce
--- /dev/null
@@ -0,0 +1,12 @@
+using Robust.Shared.Utility;
+
+namespace Content.Client.Stylesheets.SheetletConfigs;
+
+public interface IWindowConfig : ISheetletConfig
+{
+    public ResPath WindowHeaderTexturePath { get; }
+    public ResPath WindowHeaderAlertTexturePath { get; }
+    public ResPath WindowBackgroundPath { get; }
+    public ResPath WindowBackgroundBorderedPath { get; }
+    public ResPath TransparentWindowBackgroundBorderedPath { get; }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/ButtonSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/ButtonSheetlet.cs
new file mode 100644 (file)
index 0000000..bb28109
--- /dev/null
@@ -0,0 +1,174 @@
+using System.Numerics;
+using Content.Client.Stylesheets.Palette;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class ButtonSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, IButtonConfig, IIconConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IButtonConfig buttonCfg = sheet;
+        IIconConfig iconCfg = sheet;
+
+        var crossTex = sheet.GetTextureOr(iconCfg.CrossIconPath, NanotrasenStylesheet.TextureRoot);
+
+        var rules = new List<StyleRule>
+        {
+            // Set textures for the kinds of buttons
+            CButton()
+                .Box(StyleBoxHelpers.BaseStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonOpenLeft)
+                .Box(StyleBoxHelpers.OpenLeftStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonOpenRight)
+                .Box(StyleBoxHelpers.OpenRightStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonOpenBoth)
+                .Box(StyleBoxHelpers.SquareStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonSquare)
+                .Box(StyleBoxHelpers.SquareStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonSmall)
+                .Box(StyleBoxHelpers.SmallStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonSmall)
+                .ParentOf(E<Label>())
+                .Font(sheet.BaseFont.GetFont(8)),
+            CButton().Class(StyleClass.ButtonBig).ParentOf(E<Label>()).Font(sheet.BaseFont.GetFont(16)),
+
+            // Cross Button (Red)
+            E<TextureButton>()
+                .Class(StyleClass.CrossButtonRed)
+                .Prop(TextureButton.StylePropertyTexture, crossTex),
+
+            // Ensure labels in buttons are aligned.
+            E<Label>()
+                // ReSharper disable once AccessToStaticMemberViaDerivedType
+                .Class(Button.StyleClassButton)
+                .AlignMode(Label.AlignMode.Center),
+
+            // Have disabled button's text be faded
+            CButton().PseudoDisabled().ParentOf(E<Label>()).FontColor(Color.FromHex("#E5E5E581")),
+            CButton().PseudoDisabled().ParentOf(E()).ParentOf(E<Label>()).FontColor(Color.FromHex("#E5E5E581")),
+        };
+        // Texture button modulation
+        MakeButtonRules<TextureButton>(rules, Palettes.AlphaModulate, null);
+        MakeButtonRules<TextureButton>(rules, sheet.NegativePalette, StyleClass.CrossButtonRed);
+
+        MakeButtonRules(rules, buttonCfg.ButtonPalette, null);
+        MakeButtonRules(rules, buttonCfg.PositiveButtonPalette, StyleClass.Positive);
+        MakeButtonRules(rules, buttonCfg.NegativeButtonPalette, StyleClass.Negative);
+
+        return rules.ToArray();
+    }
+
+    public static void MakeButtonRules<TC>(
+        List<StyleRule> rules,
+        ColorPalette palette,
+        string? styleclass)
+        where TC : Control
+    {
+        rules.AddRange([
+            E<TC>().MaybeClass(styleclass).PseudoNormal().Modulate(palette.Element),
+            E<TC>().MaybeClass(styleclass).PseudoHovered().Modulate(palette.HoveredElement),
+            E<TC>().MaybeClass(styleclass).PseudoPressed().Modulate(palette.PressedElement),
+            E<TC>().MaybeClass(styleclass).PseudoDisabled().Modulate(palette.DisabledElement),
+        ]);
+    }
+
+    public static void MakeButtonRules(
+        List<StyleRule> rules,
+        ColorPalette palette,
+        string? styleclass)
+    {
+        rules.AddRange([
+            E().MaybeClass(styleclass).PseudoNormal().Prop(Control.StylePropertyModulateSelf, palette.Element),
+            E().MaybeClass(styleclass).PseudoHovered().Prop(Control.StylePropertyModulateSelf, palette.HoveredElement),
+            E().MaybeClass(styleclass).PseudoPressed().Prop(Control.StylePropertyModulateSelf, palette.PressedElement),
+            E()
+                .MaybeClass(styleclass)
+                .PseudoDisabled()
+                .Prop(Control.StylePropertyModulateSelf, palette.DisabledElement),
+        ]);
+    }
+
+    private static MutableSelectorElement CButton()
+    {
+        return E<ContainerButton>().Class(ContainerButton.StyleClassButton);
+    }
+}
+
+// this is currently the only other "helper" type class, if any more crop up consider making a specific directory for them
+public static class StyleBoxHelpers
+{
+    // TODO: Figure out a nicer way to store/represent these hardcoded margins. This is icky.
+    public static StyleBoxTexture BaseStyleBox<T>(T sheet) where T : PalettedStylesheet, IButtonConfig
+    {
+        var baseBox = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(sheet.BaseButtonPath, NanotrasenStylesheet.TextureRoot),
+        };
+        baseBox.SetPatchMargin(StyleBox.Margin.All, 10);
+        baseBox.SetPadding(StyleBox.Margin.All, 1);
+        baseBox.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
+        baseBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 14);
+        return baseBox;
+    }
+
+    public static StyleBoxTexture OpenLeftStyleBox<T>(T sheet) where T : PalettedStylesheet, IButtonConfig
+    {
+        var openLeftBox = new StyleBoxTexture(BaseStyleBox(sheet))
+        {
+            Texture = new AtlasTexture(sheet.GetTextureOr(sheet.OpenLeftButtonPath, NanotrasenStylesheet.TextureRoot),
+                UIBox2.FromDimensions(new Vector2(10, 0), new Vector2(14, 24))),
+        };
+        openLeftBox.SetPatchMargin(StyleBox.Margin.Left, 0);
+        openLeftBox.SetContentMarginOverride(StyleBox.Margin.Left, 8);
+        // openLeftBox.SetPadding(StyleBox.Margin.Left, 1);
+        return openLeftBox;
+    }
+
+    public static StyleBoxTexture OpenRightStyleBox<T>(T sheet) where T : PalettedStylesheet, IButtonConfig
+    {
+        var openRightBox = new StyleBoxTexture(BaseStyleBox(sheet))
+        {
+            Texture = new AtlasTexture(sheet.GetTextureOr(sheet.OpenRightButtonPath, NanotrasenStylesheet.TextureRoot),
+                UIBox2.FromDimensions(new Vector2(0, 0), new Vector2(14, 24))),
+        };
+        openRightBox.SetPatchMargin(StyleBox.Margin.Right, 0);
+        openRightBox.SetContentMarginOverride(StyleBox.Margin.Right, 8);
+        openRightBox.SetPadding(StyleBox.Margin.Right, 1);
+        return openRightBox;
+    }
+
+    public static StyleBoxTexture SquareStyleBox<T>(T sheet) where T : PalettedStylesheet, IButtonConfig
+    {
+        var openBothBox = new StyleBoxTexture(BaseStyleBox(sheet))
+        {
+            Texture = new AtlasTexture(sheet.GetTextureOr(sheet.OpenBothButtonPath, NanotrasenStylesheet.TextureRoot),
+                UIBox2.FromDimensions(new Vector2(10, 0), new Vector2(3, 24))),
+        };
+        openBothBox.SetPatchMargin(StyleBox.Margin.Horizontal, 0);
+        openBothBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 8);
+        openBothBox.SetPadding(StyleBox.Margin.Horizontal, 1);
+        return openBothBox;
+    }
+
+    public static StyleBoxTexture SmallStyleBox<T>(T sheet) where T : PalettedStylesheet, IButtonConfig
+    {
+        var smallBox = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(sheet.SmallButtonPath, NanotrasenStylesheet.TextureRoot),
+        };
+        return smallBox;
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/CheckboxSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/CheckboxSheetlet.cs
new file mode 100644 (file)
index 0000000..67ad4b2
--- /dev/null
@@ -0,0 +1,33 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class CheckboxSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, ICheckboxConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        ICheckboxConfig checkboxCfg = sheet;
+
+        var uncheckedTex = sheet.GetTextureOr(checkboxCfg.CheckboxUncheckedPath, NanotrasenStylesheet.TextureRoot);
+        var checkedTex = sheet.GetTextureOr(checkboxCfg.CheckboxCheckedPath, NanotrasenStylesheet.TextureRoot);
+
+        return
+        [
+            E<TextureRect>()
+                .Class(CheckBox.StyleClassCheckBox)
+                .Prop(TextureRect.StylePropertyTexture, uncheckedTex),
+            E<TextureRect>()
+                .Class(CheckBox.StyleClassCheckBox)
+                .Class(CheckBox.StyleClassCheckBoxChecked)
+                .Prop(TextureRect.StylePropertyTexture, checkedTex),
+            E<BoxContainer>()
+                .Class(CheckBox.StyleClassCheckBox)
+                .Prop(BoxContainer.StylePropertySeparation, 10),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/DividersSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/DividersSheetlet.cs
new file mode 100644 (file)
index 0000000..41226c7
--- /dev/null
@@ -0,0 +1,34 @@
+using System.Numerics;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class DividersSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        var boxHighDivider = new StyleBoxFlat
+        {
+            BackgroundColor = sheet.HighlightPalette.Base,
+            ContentMarginBottomOverride = 2,
+            ContentMarginLeftOverride = 2,
+        };
+
+        var boxLowDivider = new StyleBoxFlat(sheet.SecondaryPalette.TextDark);
+
+        // high divider and low divider styles are VERY inconsistent but its too much of a pain to change right now (also HighDivider has its own Control ???)
+        // i dont think theres a good resolution to this besides just deleting HighDivider. HighDivider is barely used but LowDivider is used everywhere.
+        return
+        [
+            E<PanelContainer>()
+                .Class(StyleClass.LowDivider)
+                .Panel(boxLowDivider)
+                .MinSize(new Vector2(2, 2)),
+            E<PanelContainer>().Class(StyleClass.HighDivider).Panel(boxHighDivider),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/FancyTreeSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/FancyTreeSheetlet.cs
new file mode 100644 (file)
index 0000000..6912dc1
--- /dev/null
@@ -0,0 +1,36 @@
+using Content.Client.UserInterface.Controls.FancyTree;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class FancyTreeSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        return
+        [
+            E<ContainerButton>()
+                .Identifier(TreeItem.StyleIdentifierTreeButton)
+                .Class(TreeItem.StyleClassEvenRow)
+                .Prop(ContainerButton.StylePropertyStyleBox, new StyleBoxFlat(sheet.SecondaryPalette.BackgroundLight)),
+            E<ContainerButton>()
+                .Identifier(TreeItem.StyleIdentifierTreeButton)
+                .Class(TreeItem.StyleClassOddRow)
+                .Prop(ContainerButton.StylePropertyStyleBox, new StyleBoxFlat(sheet.SecondaryPalette.Background)),
+
+            E<ContainerButton>()
+                .Identifier(TreeItem.StyleIdentifierTreeButton)
+                .Class(TreeItem.StyleClassSelected)
+                .Prop(ContainerButton.StylePropertyStyleBox, new StyleBoxFlat(sheet.PrimaryPalette.Element)),
+
+            E<ContainerButton>()
+                .Identifier(TreeItem.StyleIdentifierTreeButton)
+                .Pseudo(ContainerButton.StylePseudoClassHover)
+                .Prop(ContainerButton.StylePropertyStyleBox, new StyleBoxFlat(sheet.PrimaryPalette.HoveredElement)),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/HLineSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/HLineSheetlet.cs
new file mode 100644 (file)
index 0000000..bfd8ac6
--- /dev/null
@@ -0,0 +1,26 @@
+using Content.Client.UserInterface.Controls;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class HLineSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        return
+        [
+            E<HLine>()
+                .Class(StyleClass.Positive)
+                .Panel(new StyleBoxFlat(sheet.PositivePalette.Text)),
+            E<HLine>()
+                .Class(StyleClass.Highlight)
+                .Panel(new StyleBoxFlat(sheet.HighlightPalette.Text)),
+            E<HLine>()
+                .Class(StyleClass.Negative)
+                .Panel(new StyleBoxFlat(sheet.NegativePalette.Text)),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/Hud/ActionSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/Hud/ActionSheetlet.cs
new file mode 100644 (file)
index 0000000..cc8e1d5
--- /dev/null
@@ -0,0 +1,43 @@
+using Content.Client.Resources;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Content.Client.UserInterface.Systems.Actions.Controls;
+using Content.Client.UserInterface.Systems.Actions.Windows;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets.Hud;
+
+[CommonSheetlet]
+public sealed class ActionSheetlet<T> : Sheetlet<T> where T: PalettedStylesheet, IPanelConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IPanelConfig panelCfg = sheet;
+
+        // TODO: absolute texture access
+        var handSlotHighlightTex = ResCache.GetTexture("/Textures/Interface/Inventory/hand_slot_highlight.png");
+        var handSlotHighlight = new StyleBoxTexture
+        {
+            Texture = handSlotHighlightTex,
+        };
+        handSlotHighlight.SetPatchMargin(StyleBox.Margin.All, 2);
+
+        var actionSearchBoxTex =
+            sheet.GetTextureOr(panelCfg.BlackPanelDarkThinBorderPath, NanotrasenStylesheet.TextureRoot);
+        var actionSearchBox = new StyleBoxTexture
+        {
+            Texture = actionSearchBoxTex,
+        };
+        actionSearchBox.SetPatchMargin(StyleBox.Margin.All, 3);
+        actionSearchBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
+
+        return
+        [
+            E<PanelContainer>().Class(ActionButton.StyleClassActionHighlightRect).Panel(handSlotHighlight),
+            E<LineEdit>().Class(ActionsWindow.StyleClassActionSearchBox).Box(actionSearchBox),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/Hud/ChatGameScreenSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/Hud/ChatGameScreenSheetlet.cs
new file mode 100644 (file)
index 0000000..e93377b
--- /dev/null
@@ -0,0 +1,24 @@
+using Content.Client.UserInterface.Screens;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets.Hud;
+
+[CommonSheetlet]
+public sealed class ChatGameScreenSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        return
+        [
+            E()
+                .Class(SeparatedChatGameScreen.StyleClassChatContainer)
+                .Panel(new StyleBoxFlat(sheet.SecondaryPalette.Background)),
+            E<OutputPanel>()
+                .Class(SeparatedChatGameScreen.StyleClassChatOutput)
+                .Panel(new StyleBoxFlat(sheet.SecondaryPalette.BackgroundDark)),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/Hud/ChatSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/Hud/ChatSheetlet.cs
new file mode 100644 (file)
index 0000000..ca721c5
--- /dev/null
@@ -0,0 +1,51 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Content.Client.UserInterface.Systems.Chat.Controls;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets.Hud;
+
+[CommonSheetlet]
+public sealed class ChatSheetlet<T> : Sheetlet<T> where T: PalettedStylesheet, IButtonConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IButtonConfig btnCfg = sheet;
+
+        var chatColor = sheet.SecondaryPalette.Background.WithAlpha(221.0f / 255.0f);
+        var chatBg = new StyleBoxFlat(chatColor);
+
+        var chatChannelButtonTex =
+            sheet.GetTextureOr(btnCfg.RoundedButtonBorderedPath, NanotrasenStylesheet.TextureRoot);
+        var chatChannelButton = new StyleBoxTexture
+        {
+            Texture = chatChannelButtonTex,
+        };
+        chatChannelButton.SetPatchMargin(StyleBox.Margin.All, 5);
+        chatChannelButton.SetPadding(StyleBox.Margin.All, 2);
+
+        var chatFilterButtonTex =
+            sheet.GetTextureOr(btnCfg.RoundedButtonBorderedPath, NanotrasenStylesheet.TextureRoot);
+        var chatFilterButton = new StyleBoxTexture
+        {
+            Texture = chatFilterButtonTex,
+        };
+        chatFilterButton.SetPatchMargin(StyleBox.Margin.All, 5);
+        chatFilterButton.SetPadding(StyleBox.Margin.All, 2);
+
+        return
+        [
+            E<PanelContainer>()
+                .Class(ChatInputBox.StyleClassChatPanel)
+                .Panel(chatBg),
+            E<LineEdit>()
+                .Class(ChatInputBox.StyleClassChatLineEdit)
+                .Prop(LineEdit.StylePropertyStyleBox, new StyleBoxEmpty()),
+            E<Button>().Class(ChatInputBox.StyleClassChatFilterOptionButton).Box(chatChannelButton),
+            E<ContainerButton>().Class(ChatInputBox.StyleClassChatFilterOptionButton).Box(chatFilterButton),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/Hud/ContextMenuSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/Hud/ContextMenuSheetlet.cs
new file mode 100644 (file)
index 0000000..7016896
--- /dev/null
@@ -0,0 +1,88 @@
+using Content.Client.ContextMenu.UI;
+using Content.Client.Resources;
+using Content.Client.Stylesheets.Fonts;
+using Content.Client.Stylesheets.Palette;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Content.Client.Verbs.UI;
+using Content.Shared.Verbs;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets.Hud;
+
+[CommonSheetlet]
+public sealed class ContextMenuSheetlet<T> : Sheetlet<T>
+    where T : PalettedStylesheet, IWindowConfig, IButtonConfig, IIconConfig
+{
+    // TODO: make this not hardcoded (I am too scared to change the context menu colors)
+    private static readonly ColorPalette ContextButtonPalette = ColorPalette.FromHexBase("#000000") with
+    {
+        HoveredElement = Color.DarkSlateGray,
+        Element = Color.FromHex("#1119"),
+        PressedElement = Color.LightSlateGray,
+    };
+
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IWindowConfig windowCfg = sheet;
+
+        var borderedWindowBackground = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(windowCfg.WindowBackgroundBorderedPath, NanotrasenStylesheet.TextureRoot),
+        };
+        borderedWindowBackground.SetPatchMargin(StyleBox.Margin.All, ContextMenuElement.ElementMargin);
+        var buttonContext = new StyleBoxTexture { Texture = Texture.White };
+        var contextMenuExpansionTexture = ResCache.GetTexture("/Textures/Interface/VerbIcons/group.svg.192dpi.png");
+        var verbMenuConfirmationTexture = ResCache.GetTexture("/Textures/Interface/VerbIcons/group.svg.192dpi.png");
+
+        var rules = new List<StyleRule>
+        {
+            // Context Menu window
+            E<PanelContainer>()
+                .Class(ContextMenuPopup.StyleClassContextMenuPopup)
+                .Panel(borderedWindowBackground),
+
+            // Context menu buttons
+            E<ContextMenuElement>()
+                .Class(ContextMenuElement.StyleClassContextMenuButton)
+                .Prop(ContainerButton.StylePropertyStyleBox, buttonContext),
+
+            // Context Menu Labels
+            E<RichTextLabel>()
+                .Class(InteractionVerb.DefaultTextStyleClass)
+                .Font(sheet.BaseFont.GetFont(12, FontKind.BoldItalic)),
+            E<RichTextLabel>()
+                .Class(ActivationVerb.DefaultTextStyleClass)
+                .Font(sheet.BaseFont.GetFont(12, FontKind.Bold)),
+            E<RichTextLabel>()
+                .Class(AlternativeVerb.DefaultTextStyleClass)
+                .Font(sheet.BaseFont.GetFont(12, FontKind.Italic)),
+            E<RichTextLabel>()
+                .Class(Verb.DefaultTextStyleClass)
+                .Font(sheet.BaseFont.GetFont(12)),
+            E<TextureRect>()
+                .Class(ContextMenuElement.StyleClassContextMenuExpansionTexture)
+                .Prop(TextureRect.StylePropertyTexture, contextMenuExpansionTexture),
+            E<TextureRect>()
+                .Class(VerbMenuElement.StyleClassVerbMenuConfirmationTexture)
+                .Prop(TextureRect.StylePropertyTexture, verbMenuConfirmationTexture),
+
+            // Context menu confirm buttons
+            E<ContextMenuElement>()
+                .Class(ConfirmationMenuElement.StyleClassConfirmationContextMenuButton)
+                .Prop(ContainerButton.StylePropertyStyleBox, buttonContext),
+        };
+
+        ButtonSheetlet<T>.MakeButtonRules<ContextMenuElement>(rules,
+            ContextButtonPalette,
+            ContextMenuElement.StyleClassContextMenuButton);
+        ButtonSheetlet<T>.MakeButtonRules<ContextMenuElement>(rules,
+            sheet.NegativePalette,
+            ConfirmationMenuElement.StyleClassConfirmationContextMenuButton);
+
+        return rules.ToArray();
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/Hud/ExamineButtonSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/Hud/ExamineButtonSheetlet.cs
new file mode 100644 (file)
index 0000000..5ab78c7
--- /dev/null
@@ -0,0 +1,46 @@
+using Content.Client.Examine;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets.Hud;
+
+[CommonSheetlet]
+public sealed class ExamineButtonSheetlet : Sheetlet<PalettedStylesheet>
+{
+    // Examine button colors
+    // TODO: FIX!!
+    private static readonly Color ExamineButtonColorContext = Color.Transparent;
+    private static readonly Color ExamineButtonColorContextHover = Color.DarkSlateGray;
+    private static readonly Color ExamineButtonColorContextPressed = Color.LightSlateGray;
+    private static readonly Color ExamineButtonColorContextDisabled = Color.FromHex("#5A5A5A");
+
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        var buttonContext = new StyleBoxTexture { Texture = Texture.White };
+
+        return
+        [
+            E<ExamineButton>()
+                .Class(ExamineButton.StyleClassExamineButton)
+                .Prop(ContainerButton.StylePropertyStyleBox, buttonContext),
+            E<ExamineButton>()
+                .Class(ExamineButton.StyleClassExamineButton)
+                .PseudoNormal()
+                .Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContext),
+            E<ExamineButton>()
+                .Class(ExamineButton.StyleClassExamineButton)
+                .PseudoHovered()
+                .Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextHover),
+            E<ExamineButton>()
+                .Class(ExamineButton.StyleClassExamineButton)
+                .PseudoPressed()
+                .Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextPressed),
+            E<ExamineButton>()
+                .Class(ExamineButton.StyleClassExamineButton)
+                .PseudoDisabled()
+                .Prop(Control.StylePropertyModulateSelf, ExamineButtonColorContextDisabled),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/Hud/ItemStatusSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/Hud/ItemStatusSheetlet.cs
new file mode 100644 (file)
index 0000000..cc95d17
--- /dev/null
@@ -0,0 +1,30 @@
+using Content.Client.Stylesheets.Fonts;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets.Hud;
+
+[CommonSheetlet]
+public sealed class ItemStatusSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        return
+        [
+            E()
+                .Class(StyleClass.ItemStatus)
+                .Prop("font", sheet.BaseFont.GetFont(10)),
+
+            E()
+                .Class(StyleClass.ItemStatusNotHeld)
+                .Prop("font", sheet.BaseFont.GetFont(10, FontKind.Italic))
+                .Prop("font-color", Color.Gray),
+
+            E<RichTextLabel>()
+                .Class(StyleClass.ItemStatus)
+                .Prop(nameof(RichTextLabel.LineHeightScale), 0.7f)
+                .Prop(nameof(Control.Margin), new Thickness(0, 0, 0, -6)),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/Hud/TooltipSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/Hud/TooltipSheetlet.cs
new file mode 100644 (file)
index 0000000..16a5cfe
--- /dev/null
@@ -0,0 +1,64 @@
+using Content.Client.Examine;
+using Content.Client.Stylesheets.Fonts;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using Robust.Client.UserInterface.CustomControls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets.Hud;
+
+[CommonSheetlet]
+public sealed class TooltipSheetlet<T> : Sheetlet<T> where T: PalettedStylesheet, ITooltipConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        ITooltipConfig tooltipCfg = sheet;
+
+        var tooltipBox = sheet.GetTextureOr(tooltipCfg.TooltipBoxPath, NanotrasenStylesheet.TextureRoot)
+            .IntoPatch(StyleBox.Margin.All, 2);
+        tooltipBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 7);
+
+        var whisperBox = sheet.GetTextureOr(tooltipCfg.WhisperBoxPath, NanotrasenStylesheet.TextureRoot)
+            .IntoPatch(StyleBox.Margin.All, 2);
+        whisperBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 7);
+
+        return
+        [
+            E<PanelContainer>()
+                .Class(StyleClass.TooltipPanel)
+                .Modulate(Color.Gray.WithAlpha(0.9f)) // TODO: you know the drill by now
+                .Panel(tooltipBox),
+            E<RichTextLabel>()
+                .Class(StyleClass.TooltipTitle)
+                .Font(sheet.BaseFont.GetFont(14, FontKind.Bold)),
+            E<RichTextLabel>()
+                .Class(StyleClass.TooltipDesc)
+                .Font(sheet.BaseFont.GetFont(12)),
+
+            E<Tooltip>()
+                // ReSharper disable once AccessToStaticMemberViaDerivedType
+                .Prop(Tooltip.StylePropertyPanel, tooltipBox),
+            E<PanelContainer>()
+                .Class(ExamineSystem.StyleClassEntityTooltip)
+                .Panel(tooltipBox),
+            E<PanelContainer>()
+                .Class("speechBox", "sayBox")
+                .Panel(tooltipBox),
+            E<PanelContainer>()
+                .Class("speechBox", "whisperBox")
+                .Panel(whisperBox),
+
+            E<PanelContainer>()
+                .Class("speechBox", "whisperBox")
+                .ParentOf(E<RichTextLabel>().Class("bubbleContent"))
+                .Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(12, FontKind.Italic)),
+            E<PanelContainer>()
+                .Class("speechBox", "emoteBox")
+                .ParentOf(E<RichTextLabel>().Class("bubbleContent"))
+                .Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(12, FontKind.Italic)),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/ItemListSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/ItemListSheetlet.cs
new file mode 100644 (file)
index 0000000..26a8210
--- /dev/null
@@ -0,0 +1,52 @@
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class ItemListSheetlet : Sheetlet<PalettedStylesheet>
+{
+    private static StyleBoxFlat Box(Color c)
+    {
+        return new StyleBoxFlat(c)
+            // TODO: dont hardcode these maybe
+            {
+                ContentMarginLeftOverride = 4,
+                ContentMarginTopOverride = 2,
+                ContentMarginRightOverride = 4,
+                ContentMarginBottomOverride = 2,
+            };
+    }
+
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        var boxBackground = new StyleBoxFlat { BackgroundColor = sheet.PrimaryPalette.Background };
+        var boxItemBackground = Box(sheet.PrimaryPalette.Background);
+        var boxSelected = Box(sheet.PrimaryPalette.Element);
+        var boxDisabled = Box(sheet.PrimaryPalette.BackgroundDark);
+
+        return
+        [
+            E<ItemList>()
+                .Prop(ItemList.StylePropertyBackground, boxBackground)
+                .Prop(ItemList.StylePropertyItemBackground, boxItemBackground)
+                .Prop(ItemList.StylePropertyDisabledItemBackground, boxDisabled)
+                .Prop(ItemList.StylePropertySelectedItemBackground, boxSelected),
+
+            // these styles seem to be unused now
+            // E<ItemList>().Class("transparentItemList")
+            //     .Prop(ItemList.StylePropertyBackground, boxTransparent)
+            //     .Prop(ItemList.StylePropertyItemBackground, boxTransparent)
+            //     .Prop(ItemList.StylePropertyDisabledItemBackground, boxDisabled)
+            //     .Prop(ItemList.StylePropertySelectedItemBackground, boxItemBackground),
+            //
+            // E<ItemList>().Class("transparentBackgroundItemList")
+            //     .Prop(ItemList.StylePropertyBackground, boxTransparent)
+            //     .Prop(ItemList.StylePropertyItemBackground, boxBackground)
+            //     .Prop(ItemList.StylePropertyDisabledItemBackground, boxItemBackground)
+            //     .Prop(ItemList.StylePropertySelectedItemBackground, boxSelected),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/LabelSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/LabelSheetlet.cs
new file mode 100644 (file)
index 0000000..9135b53
--- /dev/null
@@ -0,0 +1,63 @@
+using Content.Client.Stylesheets.Fonts;
+using Content.Client.Stylesheets.Palette;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class LabelSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        return
+        [
+            E<Label>()
+                .Class(StyleClass.LabelHeading)
+                .Font(sheet.BaseFont.GetFont(16, FontKind.Bold))
+                .FontColor(sheet.HighlightPalette.Text),
+            E<Label>()
+                .Class(StyleClass.LabelHeadingBigger)
+                .Font(sheet.BaseFont.GetFont(20, FontKind.Bold))
+                .FontColor(sheet.HighlightPalette.Text),
+            E<Label>()
+                .Class(StyleClass.LabelSubText)
+                .Font(sheet.BaseFont.GetFont(10))
+                .FontColor(Color.DarkGray),
+            E<Label>()
+                .Class(StyleClass.LabelKeyText)
+                .Font(sheet.BaseFont.GetFont(12, FontKind.Bold))
+                .FontColor(sheet.HighlightPalette.Text),
+            E<Label>()
+                .Class(StyleClass.LabelWeak)
+                .FontColor(Color.DarkGray), // TODO: you know the drill by now
+
+            E<Label>()
+                .Class(StyleClass.Positive)
+                .FontColor(sheet.PositivePalette.Text),
+            E<Label>()
+                .Class(StyleClass.Negative)
+                .FontColor(sheet.NegativePalette.Text),
+            E<Label>()
+                .Class(StyleClass.Highlight)
+                .FontColor(sheet.HighlightPalette.Text),
+
+            E<Label>()
+                .Class(StyleClass.StatusGood)
+                .FontColor(Palettes.Status.Good),
+            E<Label>()
+                .Class(StyleClass.StatusOkay)
+                .FontColor(Palettes.Status.Okay),
+            E<Label>()
+                .Class(StyleClass.StatusWarning)
+                .FontColor(Palettes.Status.Warning),
+            E<Label>()
+                .Class(StyleClass.StatusBad)
+                .FontColor(Palettes.Status.Bad),
+            E<Label>()
+                .Class(StyleClass.StatusCritical)
+                .FontColor(Palettes.Status.Critical),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/LineEditSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/LineEditSheetlet.cs
new file mode 100644 (file)
index 0000000..b478af5
--- /dev/null
@@ -0,0 +1,37 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class LineEditSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, ILineEditConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        ILineEditConfig lineEditCfg = sheet;
+
+        var lineEditStylebox = sheet.GetTextureOr(lineEditCfg.LineEditPath, NanotrasenStylesheet.TextureRoot)
+            .IntoPatch(StyleBox.Margin.All, 3);
+        lineEditStylebox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
+
+        return
+        [
+            E<LineEdit>()
+                .Prop(LineEdit.StylePropertyStyleBox, lineEditStylebox),
+            // TODO: Hardcoded colors bad, kill.
+            E<LineEdit>()
+                .Class(LineEdit.StyleClassLineEditNotEditable)
+                .Prop("font-color", new Color(192, 192, 192)),
+            E<LineEdit>()
+                .Pseudo(LineEdit.StylePseudoClassPlaceholder)
+                .Prop("font-color", Color.Gray),
+            E<TextEdit>()
+                .Pseudo(TextEdit.StylePseudoClassPlaceholder)
+                .Prop("font-color", Color.Gray),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/ListContainerSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/ListContainerSheetlet.cs
new file mode 100644 (file)
index 0000000..ebbff95
--- /dev/null
@@ -0,0 +1,31 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.UserInterface.Controls;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class ListContainerSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, IButtonConfig, IIconConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IButtonConfig buttonCfg = sheet;
+
+        var box = new StyleBoxFlat() { BackgroundColor = Color.White };
+
+        var rules = new List<StyleRule>(
+        [
+            E<ContainerButton>()
+                .Class(ListContainer.StyleClassListContainerButton)
+                .Box(box),
+        ]);
+        ButtonSheetlet<T>.MakeButtonRules<ContainerButton>(rules,
+            buttonCfg.ButtonPalette,
+            ListContainer.StyleClassListContainerButton);
+
+        return rules.ToArray();
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/MenuButtonSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/MenuButtonSheetlet.cs
new file mode 100644 (file)
index 0000000..ac880b5
--- /dev/null
@@ -0,0 +1,80 @@
+using System.Numerics;
+using Content.Client.Stylesheets.Fonts;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Content.Client.UserInterface.Controls;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class MenuButtonSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, IButtonConfig, IIconConfig
+{
+    private static MutableSelectorElement CButton()
+    {
+        return E<MenuButton>();
+    }
+
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IButtonConfig cfg = sheet;
+
+        var buttonTex = sheet.GetTextureOr(cfg.BaseButtonPath, NanotrasenStylesheet.TextureRoot);
+        var topButtonBase = new StyleBoxTexture
+        {
+            Texture = buttonTex,
+        };
+        topButtonBase.SetPatchMargin(StyleBox.Margin.All, 10);
+        topButtonBase.SetPadding(StyleBox.Margin.All, 0);
+        topButtonBase.SetContentMarginOverride(StyleBox.Margin.All, 0);
+
+        var topButtonOpenRight = new StyleBoxTexture(topButtonBase)
+        {
+            Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(0, 0), new Vector2(14, 24))),
+        };
+        topButtonOpenRight.SetPatchMargin(StyleBox.Margin.Right, 0);
+
+        var topButtonOpenLeft = new StyleBoxTexture(topButtonBase)
+        {
+            Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(10, 0), new Vector2(14, 24))),
+        };
+        topButtonOpenLeft.SetPatchMargin(StyleBox.Margin.Left, 0);
+
+        var topButtonSquare = new StyleBoxTexture(topButtonBase)
+        {
+            Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions(new Vector2(10, 0), new Vector2(3, 24))),
+        };
+        topButtonSquare.SetPatchMargin(StyleBox.Margin.Horizontal, 0);
+
+        var rules = new List<StyleRule>
+        {
+            CButton().Class(StyleClass.ButtonSquare).Box(topButtonSquare),
+            CButton().Class(StyleClass.ButtonOpenLeft).Box(topButtonOpenLeft),
+            CButton().Class(StyleClass.ButtonOpenRight).Box(topButtonOpenRight),
+            CButton().Box(StyleBoxHelpers.BaseStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonOpenLeft)
+                .Prop(ContainerButton.StylePropertyStyleBox, StyleBoxHelpers.OpenLeftStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonOpenRight)
+                .Prop(ContainerButton.StylePropertyStyleBox, StyleBoxHelpers.OpenRightStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonOpenBoth)
+                .Prop(ContainerButton.StylePropertyStyleBox, StyleBoxHelpers.SquareStyleBox(sheet)),
+            CButton()
+                .Class(StyleClass.ButtonSquare)
+                .Prop(ContainerButton.StylePropertyStyleBox, StyleBoxHelpers.SquareStyleBox(sheet)),
+            E<Label>()
+                .Class(MenuButton.StyleClassLabelTopButton)
+                .Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(14, FontKind.Bold)),
+            // new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14),
+        };
+
+        ButtonSheetlet<T>.MakeButtonRules<MenuButton>(rules, cfg.ButtonPalette, null);
+
+        return rules.ToArray();
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/OptionButtonSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/OptionButtonSheetlet.cs
new file mode 100644 (file)
index 0000000..f972ab3
--- /dev/null
@@ -0,0 +1,31 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class OptionButtonSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, IIconConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IIconConfig iconCfg = sheet;
+
+        var invertedTriangleTex =
+            sheet.GetTextureOr(iconCfg.InvertedTriangleIconPath, NanotrasenStylesheet.TextureRoot);
+
+        return
+        [
+            E<TextureRect>()
+                .Class(OptionButton.StyleClassOptionTriangle)
+                .Prop(TextureRect.StylePropertyTexture, invertedTriangleTex),
+            E<Label>().Class(OptionButton.StyleClassOptionButton).AlignMode(Label.AlignMode.Center),
+            E<PanelContainer>()
+                .Class(OptionButton.StyleClassOptionsBackground)
+                .Panel(new StyleBoxFlat(sheet.PrimaryPalette.Background)),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/PanelSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/PanelSheetlet.cs
new file mode 100644 (file)
index 0000000..64ce2e5
--- /dev/null
@@ -0,0 +1,57 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class PanelSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, IButtonConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IButtonConfig buttonCfg = sheet;
+
+        var boxLight = new StyleBoxFlat()
+        {
+            BackgroundColor = sheet.SecondaryPalette.BackgroundLight,
+        };
+        var boxDark = new StyleBoxFlat()
+        {
+            BackgroundColor = sheet.SecondaryPalette.BackgroundDark,
+        };
+        var boxPositive = new StyleBoxFlat { BackgroundColor = sheet.PositivePalette.Background };
+        var boxNegative = new StyleBoxFlat { BackgroundColor = sheet.NegativePalette.Background };
+        var boxHighlight = new StyleBoxFlat { BackgroundColor = sheet.HighlightPalette.Background };
+
+        return
+        [
+            E<PanelContainer>().Class(StyleClass.PanelLight).Panel(boxLight),
+            E<PanelContainer>().Class(StyleClass.PanelDark).Panel(boxDark),
+
+            E<PanelContainer>().Class(StyleClass.Positive).Panel(boxPositive),
+            E<PanelContainer>().Class(StyleClass.Negative).Panel(boxNegative),
+            E<PanelContainer>().Class(StyleClass.Highlight).Panel(boxHighlight),
+
+            // TODO: this should probably be cleaned up but too many UIs rely on this hardcoded color so I'm scared to touch it
+            E<PanelContainer>()
+                .Class("BackgroundDark")
+                .Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat(Color.FromHex("#25252A"))),
+
+            // panels that have the same corner bezels as buttons
+            E()
+                .Class(StyleClass.BackgroundPanel)
+                .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.BaseStyleBox(sheet))
+                .Modulate(sheet.SecondaryPalette.Background),
+            E()
+                .Class(StyleClass.BackgroundPanelOpenLeft)
+                .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.OpenLeftStyleBox(sheet))
+                .Modulate(sheet.SecondaryPalette.Background),
+            E()
+                .Class(StyleClass.BackgroundPanelOpenRight)
+                .Prop(PanelContainer.StylePropertyPanel, StyleBoxHelpers.OpenRightStyleBox(sheet))
+                .Modulate(sheet.SecondaryPalette.Background),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/PlaceholderSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/PlaceholderSheetlet.cs
new file mode 100644 (file)
index 0000000..eed7062
--- /dev/null
@@ -0,0 +1,34 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Content.Client.UserInterface.Controls;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class PlaceholderSheetlet<T> : Sheetlet<T> where T: PalettedStylesheet, IPlaceholderConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IPlaceholderConfig placeholderCfg = sheet;
+
+        var placeholderBox = sheet.GetTextureOr(placeholderCfg.PlaceholderPath, NanotrasenStylesheet.TextureRoot)
+            .IntoPatch(StyleBox.Margin.All, 19);
+        placeholderBox.SetExpandMargin(StyleBox.Margin.All, -5);
+        placeholderBox.Mode = StyleBoxTexture.StretchMode.Tile;
+
+        return
+        [
+            E<Placeholder>()
+                // ReSharper disable once AccessToStaticMemberViaDerivedType
+                .Prop(Placeholder.StylePropertyPanel, placeholderBox),
+            E<Label>()
+                .Class(Placeholder.StyleClassPlaceholderText)
+                .Font(sheet.BaseFont.GetFont(16))
+                .FontColor(new Color(103, 103, 103, 128)), // TODO: fix hardcoded color
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/ProgressBarSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/ProgressBarSheetlet.cs
new file mode 100644 (file)
index 0000000..e342042
--- /dev/null
@@ -0,0 +1,32 @@
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class ProgressBarSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        // TODO: 1) hardcoded colors, 2) yuck
+        var progressBarBackground = new StyleBoxFlat
+        {
+            BackgroundColor = new Color(0.25f, 0.25f, 0.25f),
+        };
+        progressBarBackground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f);
+        var progressBarForeground = new StyleBoxFlat
+        {
+            BackgroundColor = new Color(0.25f, 0.50f, 0.25f),
+        };
+        progressBarForeground.SetContentMarginOverride(StyleBox.Margin.Vertical, 14.5f);
+
+        return
+        [
+            E<ProgressBar>()
+                .Prop(ProgressBar.StylePropertyBackground, progressBarBackground)
+                .Prop(ProgressBar.StylePropertyForeground, progressBarForeground),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/RadialMenuSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/RadialMenuSheetlet.cs
new file mode 100644 (file)
index 0000000..20f7eab
--- /dev/null
@@ -0,0 +1,51 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class RadialMenuSheetlet<T> : Sheetlet<T> where T: PalettedStylesheet, IRadialMenuConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IRadialMenuConfig radialCfg = sheet;
+
+        var btnNormalTex = sheet.GetTextureOr(radialCfg.ButtonNormalPath, NanotrasenStylesheet.TextureRoot);
+        var btnHoverTex = sheet.GetTextureOr(radialCfg.ButtonHoverPath, NanotrasenStylesheet.TextureRoot);
+        var closeNormalTex = sheet.GetTextureOr(radialCfg.CloseNormalPath, NanotrasenStylesheet.TextureRoot);
+        var closeHoverTex = sheet.GetTextureOr(radialCfg.CloseHoverPath, NanotrasenStylesheet.TextureRoot);
+        var backNormalTex = sheet.GetTextureOr(radialCfg.BackNormalPath, NanotrasenStylesheet.TextureRoot);
+        var backHoverTex = sheet.GetTextureOr(radialCfg.BackHoverPath, NanotrasenStylesheet.TextureRoot);
+
+        return
+        [
+            // TODO: UNHARDCODE
+            E<TextureButton>()
+                .Class("RadialMenuButton")
+                .Prop(TextureButton.StylePropertyTexture, btnNormalTex),
+            E<TextureButton>()
+                .Class("RadialMenuButton")
+                .Pseudo(TextureButton.StylePseudoClassHover)
+                .Prop(TextureButton.StylePropertyTexture, btnHoverTex),
+
+            E<TextureButton>()
+                .Class("RadialMenuCloseButton")
+                .Prop(TextureButton.StylePropertyTexture, closeNormalTex),
+            E<TextureButton>()
+                .Class("RadialMenuCloseButton")
+                .Pseudo(TextureButton.StylePseudoClassHover)
+                .Prop(TextureButton.StylePropertyTexture, closeHoverTex),
+
+            E<TextureButton>()
+                .Class("RadialMenuBackButton")
+                .Prop(TextureButton.StylePropertyTexture, backNormalTex),
+            E<TextureButton>()
+                .Class("RadialMenuBackButton")
+                .Pseudo(TextureButton.StylePseudoClassHover)
+                .Prop(TextureButton.StylePropertyTexture, backHoverTex),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/ScrollbarSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/ScrollbarSheetlet.cs
new file mode 100644 (file)
index 0000000..b7f0eec
--- /dev/null
@@ -0,0 +1,58 @@
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class ScrollbarSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public const int DefaultGrabberSize = 10;
+
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        // TODO: hardcoded colors!!!
+        var vScrollBarGrabberNormal = new StyleBoxFlat
+        {
+            BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
+            ContentMarginTopOverride = DefaultGrabberSize,
+        };
+        var vScrollBarGrabberHover = new StyleBoxFlat
+        {
+            BackgroundColor = new Color(140, 140, 140).WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
+            ContentMarginTopOverride = DefaultGrabberSize,
+        };
+
+        var vScrollBarGrabberGrabbed = new StyleBoxFlat
+        {
+            BackgroundColor = new Color(160, 160, 160).WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
+            ContentMarginTopOverride = DefaultGrabberSize,
+        };
+
+        var hScrollBarGrabberNormal = new StyleBoxFlat
+        {
+            BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize,
+        };
+
+        var hScrollBarGrabberHover = new StyleBoxFlat
+        {
+            BackgroundColor = new Color(140, 140, 140).WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize,
+        };
+
+        var hScrollBarGrabberGrabbed = new StyleBoxFlat
+        {
+            BackgroundColor = new Color(160, 160, 160).WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize,
+        };
+
+        return
+        [
+            E<VScrollBar>().Prop(ScrollBar.StylePropertyGrabber, vScrollBarGrabberNormal),
+            E<VScrollBar>().PseudoHovered().Prop(ScrollBar.StylePropertyGrabber, vScrollBarGrabberHover),
+            E<VScrollBar>().PseudoPressed().Prop(ScrollBar.StylePropertyGrabber, vScrollBarGrabberGrabbed),
+            E<HScrollBar>().Prop(ScrollBar.StylePropertyGrabber, hScrollBarGrabberNormal),
+            E<HScrollBar>().PseudoHovered().Prop(ScrollBar.StylePropertyGrabber, hScrollBarGrabberHover),
+            E<HScrollBar>().PseudoPressed().Prop(ScrollBar.StylePropertyGrabber, hScrollBarGrabberGrabbed),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/SliderSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/SliderSheetlet.cs
new file mode 100644 (file)
index 0000000..5ef1c0e
--- /dev/null
@@ -0,0 +1,74 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class SliderSheetlet<T> : Sheetlet<T> where T: PalettedStylesheet, ISliderConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        ISliderConfig sliderCfg = sheet;
+
+        var sliderFillTex = sheet.GetTextureOr(sliderCfg.SliderFillPath, NanotrasenStylesheet.TextureRoot);
+
+        var sliderFillBox = new StyleBoxTexture
+        {
+            Texture = sliderFillTex,
+            Modulate = sheet.PositivePalette.TextDark,
+        };
+
+        var sliderBackBox = new StyleBoxTexture
+        {
+            Texture = sliderFillTex,
+            Modulate = sheet.SecondaryPalette.BackgroundDark,
+        };
+
+        var sliderForeBox = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(sliderCfg.SliderOutlinePath, NanotrasenStylesheet.TextureRoot),
+            Modulate = Color.FromHex("#494949") // TODO: Unhardcode.
+        };
+
+        var sliderGrabBox = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(sliderCfg.SliderGrabber, NanotrasenStylesheet.TextureRoot),
+        };
+
+        sliderFillBox.SetPatchMargin(StyleBox.Margin.All, 12);
+        sliderBackBox.SetPatchMargin(StyleBox.Margin.All, 12);
+        sliderForeBox.SetPatchMargin(StyleBox.Margin.All, 12);
+        sliderGrabBox.SetPatchMargin(StyleBox.Margin.All, 12);
+
+        // var sliderFillGreen = new StyleBoxTexture(sliderFillBox) { Modulate = Color.LimeGreen };
+        // var sliderFillRed = new StyleBoxTexture(sliderFillBox) { Modulate = Color.Red };
+        // var sliderFillBlue = new StyleBoxTexture(sliderFillBox) { Modulate = Color.Blue };
+        // var sliderFillWhite = new StyleBoxTexture(sliderFillBox) { Modulate = Color.White };
+
+        return new StyleRule[]
+        {
+            E<Slider>()
+                .Prop(Slider.StylePropertyBackground, sliderBackBox)
+                .Prop(Slider.StylePropertyForeground, sliderForeBox)
+                .Prop(Slider.StylePropertyGrabber, sliderGrabBox)
+                .Prop(Slider.StylePropertyFill, sliderFillBox),
+            // these styles seem to be unused now
+            // E<ColorableSlider>()
+            //     .Prop(ColorableSlider.StylePropertyFillWhite, sliderFillWhite)
+            //     .Prop(ColorableSlider.StylePropertyBackgroundWhite, sliderFillWhite),
+            //
+            // E<Slider>().Class(StyleClass.StyleClassSliderRed)
+            //     .Prop(Slider.StylePropertyFill, sliderFillRed),
+            // E<Slider>().Class(StyleClass.StyleClassSliderBlue)
+            //     .Prop(Slider.StylePropertyFill, sliderFillBlue),
+            // E<Slider>().Class(StyleClass.StyleClassSliderGreen)
+            //     .Prop(Slider.StylePropertyFill, sliderFillGreen),
+            // E<Slider>().Class(StyleClass.StyleClassSliderWhite)
+            //     .Prop(Slider.StylePropertyFill, sliderFillWhite),
+        };
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/StripebackSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/StripebackSheetlet.cs
new file mode 100644 (file)
index 0000000..dc0c8dc
--- /dev/null
@@ -0,0 +1,29 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Content.Client.UserInterface.Controls;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class StripebackSheetlet<T> : Sheetlet<T> where T : PalettedStylesheet, IStripebackConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IStripebackConfig stripebackCfg = sheet;
+
+        var stripeBack = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(stripebackCfg.StripebackPath, NanotrasenStylesheet.TextureRoot),
+            Mode = StyleBoxTexture.StretchMode.Tile,
+        };
+
+        return
+        [
+            E<StripeBack>()
+                .Prop(StripeBack.StylePropertyBackground, stripeBack),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/TabContainerSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/TabContainerSheetlet.cs
new file mode 100644 (file)
index 0000000..de6add0
--- /dev/null
@@ -0,0 +1,33 @@
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class TabContainerSheetlet<T> : Sheetlet<T> where T: PalettedStylesheet, ITabContainerConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        ITabContainerConfig tabCfg = sheet;
+
+        var tabContainerPanel = sheet.GetTextureOr(tabCfg.TabContainerPanelPath, NanotrasenStylesheet.TextureRoot)
+            .IntoPatch(StyleBox.Margin.All, 2);
+
+        var tabContainerBoxActive = new StyleBoxFlat(sheet.SecondaryPalette.Element);
+        tabContainerBoxActive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
+        var tabContainerBoxInactive = new StyleBoxFlat(sheet.SecondaryPalette.Background);
+        tabContainerBoxInactive.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5);
+
+        return
+        [
+            E<TabContainer>()
+                .Prop(TabContainer.StylePropertyPanelStyleBox, tabContainerPanel)
+                .Prop(TabContainer.StylePropertyTabStyleBox, tabContainerBoxActive)
+                .Prop(TabContainer.StylePropertyTabStyleBoxInactive, tabContainerBoxInactive),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/TextSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/TextSheetlet.cs
new file mode 100644 (file)
index 0000000..71725e4
--- /dev/null
@@ -0,0 +1,25 @@
+using Content.Client.Resources;
+using Content.Client.Stylesheets.Fonts;
+using Robust.Client.UserInterface;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+/// These are not in `LabelSheetlet` because a label is not the only thing you might want to be monospaced.
+[CommonSheetlet]
+public sealed class TextSheetlet : Sheetlet<PalettedStylesheet>
+{
+    public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+    {
+        // TODO: once fonts are reworked, change this!
+        var mono = ResCache.GetFont("/EngineFonts/NotoSans/NotoSansMono-Regular.ttf", 12);
+
+        return
+        [
+            E().Class(StyleClass.Monospace).Font(mono),
+            E().Class(StyleClass.Italic).Font(sheet.BaseFont.GetFont(12, FontKind.Italic)),
+            E().Class(StyleClass.FontLarge).Font(sheet.BaseFont.GetFont(14)),
+            E().Class(StyleClass.FontSmall).Font(sheet.BaseFont.GetFont(10)),
+        ];
+    }
+}
diff --git a/Content.Client/Stylesheets/Sheetlets/WindowSheetlet.cs b/Content.Client/Stylesheets/Sheetlets/WindowSheetlet.cs
new file mode 100644 (file)
index 0000000..143baec
--- /dev/null
@@ -0,0 +1,132 @@
+using Content.Client.Resources;
+using Content.Client.Stylesheets.Fonts;
+using Content.Client.Stylesheets.Palette;
+using Content.Client.Stylesheets.SheetletConfigs;
+using Content.Client.Stylesheets.Stylesheets;
+using Content.Client.UserInterface.Controls;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using Robust.Client.UserInterface.CustomControls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Sheetlets;
+
+[CommonSheetlet]
+public sealed class WindowSheetlet<T> : Sheetlet<T>
+    where T : PalettedStylesheet, IButtonConfig, IWindowConfig, IIconConfig
+{
+    public override StyleRule[] GetRules(T sheet, object config)
+    {
+        IButtonConfig buttonCfg = sheet;
+        IWindowConfig windowCfg = sheet;
+        IIconConfig iconCfg = sheet;
+
+        var headerStylebox = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(windowCfg.WindowHeaderTexturePath, NanotrasenStylesheet.TextureRoot),
+            PatchMarginBottom = 3,
+            ExpandMarginBottom = 3,
+            ContentMarginBottomOverride = 0,
+        };
+        // TODO: This would probably be better palette-based but we can leave it for now.
+        var headerAlertStylebox = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(windowCfg.WindowHeaderAlertTexturePath, NanotrasenStylesheet.TextureRoot),
+            PatchMarginBottom = 3,
+            ExpandMarginBottom = 3,
+            ContentMarginBottomOverride = 0,
+        };
+        var backgroundBox = new StyleBoxTexture()
+        {
+            Texture = sheet.GetTextureOr(windowCfg.WindowBackgroundPath, NanotrasenStylesheet.TextureRoot),
+        };
+        backgroundBox.SetPatchMargin(StyleBox.Margin.Horizontal | StyleBox.Margin.Bottom, 2);
+        backgroundBox.SetExpandMargin(StyleBox.Margin.Horizontal | StyleBox.Margin.Bottom, 2);
+        var borderedBackgroundBox = new StyleBoxTexture
+        {
+            Texture = sheet.GetTextureOr(windowCfg.WindowBackgroundBorderedPath, NanotrasenStylesheet.TextureRoot),
+        };
+        borderedBackgroundBox.SetPatchMargin(StyleBox.Margin.All, 2);
+        var closeButtonTex = sheet.GetTextureOr(iconCfg.CrossIconPath, NanotrasenStylesheet.TextureRoot);
+
+        var leftPanel = StyleBoxHelpers.OpenLeftStyleBox(sheet);
+        leftPanel.SetPadding(StyleBox.Margin.All, 0.0f);
+
+        // TODO: maybe also change everything here to `NanoWindow` or something
+        return
+        [
+            // TODO: KILL DEFAULT WINDOW (in a bit)
+            E<Label>()
+                .Class(DefaultWindow.StyleClassWindowTitle)
+                .FontColor(sheet.HighlightPalette.Text)
+                .Font(sheet.BaseFont.GetFont(14, FontKind.Bold)),
+            E<Label>()
+                .Class("windowTitleAlert")
+                .FontColor(Color.White)
+                .Font(sheet.BaseFont.GetFont(14, FontKind.Bold)),
+            // TODO: maybe also change everything here to `NanoWindow` or something
+            E()
+                .Class(DefaultWindow.StyleClassWindowPanel)
+                .Panel(backgroundBox),
+            E()
+                .Class(DefaultWindow.StyleClassWindowHeader)
+                .Panel(headerStylebox),
+            E()
+                .Class(StyleClass.AlertWindowHeader)
+                .Panel(headerAlertStylebox),
+            E()
+                .Class(StyleClass.BorderedWindowPanel)
+                .Panel(borderedBackgroundBox),
+
+            // Close button
+            E<TextureButton>()
+                .Class(DefaultWindow.StyleClassWindowCloseButton)
+                .Prop(TextureButton.StylePropertyTexture, closeButtonTex)
+                .Margin(3),
+            E<TextureButton>()
+                .Class(DefaultWindow.StyleClassWindowCloseButton)
+                .PseudoNormal()
+                .Modulate(Palettes.Neutral.Element),
+            E<TextureButton>()
+                .Class(DefaultWindow.StyleClassWindowCloseButton)
+                .PseudoHovered()
+                .Modulate(Palettes.Red.HoveredElement),
+            E<TextureButton>()
+                .Class(DefaultWindow.StyleClassWindowCloseButton)
+                .PseudoPressed()
+                .Modulate(Palettes.Red.PressedElement),
+            E<TextureButton>()
+                .Class(DefaultWindow.StyleClassWindowCloseButton)
+                .PseudoDisabled()
+                .Modulate(Palettes.Red.DisabledElement),
+
+            // Title
+            E<Label>()
+                .Class("FancyWindowTitle") // TODO: hardcoding class name
+                .Font(ResCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 13)) // TODO: hardcoding font
+                .FontColor(sheet.HighlightPalette.Text),
+
+            // Help Button
+            E<TextureButton>()
+                .Class(FancyWindow.StyleClassWindowHelpButton)
+                .Prop(TextureButton.StylePropertyTexture,
+                    sheet.GetTextureOr(iconCfg.HelpIconPath, NanotrasenStylesheet.TextureRoot))
+                .Prop(Control.StylePropertyModulateSelf, sheet.PrimaryPalette.Element),
+            E<TextureButton>()
+                .Class(FancyWindow.StyleClassWindowHelpButton)
+                .Pseudo(ContainerButton.StylePseudoClassHover)
+                .Prop(Control.StylePropertyModulateSelf, sheet.PrimaryPalette.HoveredElement),
+            E<TextureButton>()
+                .Class(FancyWindow.StyleClassWindowHelpButton)
+                .Pseudo(ContainerButton.StylePseudoClassPressed)
+                .Prop(Control.StylePropertyModulateSelf, sheet.PrimaryPalette.PressedElement),
+
+            // Footer
+            E<Label>()
+                .Class("WindowFooterText") // TODO: hardcoding font
+                .Prop(Label.StylePropertyFont, sheet.BaseFont.GetFont(8))
+                .Prop(Label.StylePropertyFontColor, Color.FromHex("#757575")),
+        ];
+    }
+}
index 76b77cbe63fbdd6104f991ae4ec7c938837ec99a..99f71f39a2ca92a6a72f5acfa79976b3ed20833e 100644 (file)
@@ -10,25 +10,9 @@ using Robust.Shared.Maths;
 
 namespace Content.Client.Stylesheets
 {
+    [Obsolete("Please use the new sheetlet system to define styles, and remove all references to this class as it may be deleted in the future")]
     public abstract class StyleBase
     {
-        public const string ClassHighDivider = "HighDivider";
-        public const string ClassLowDivider = "LowDivider";
-        public const string StyleClassLabelHeading = "LabelHeading";
-        public const string StyleClassLabelSubText = "LabelSubText";
-        public const string StyleClassItalic = "Italic";
-
-        public const string ClassAngleRect = "AngleRect";
-
-        public const string ButtonOpenRight = "OpenRight";
-        public const string ButtonOpenLeft = "OpenLeft";
-        public const string ButtonOpenBoth = "OpenBoth";
-        public const string ButtonSquare = "ButtonSquare";
-
-        public const string ButtonCaution = "Caution";
-
-        public const int DefaultGrabberSize = 10;
-
         public abstract Stylesheet Stylesheet { get; }
 
         protected StyleRule[] BaseRules { get; }
@@ -123,35 +107,6 @@ namespace Content.Client.Stylesheets
             };
             AngleBorderRect.SetPatchMargin(StyleBox.Margin.All, 10);
 
-            var vScrollBarGrabberNormal = new StyleBoxFlat
-            {
-                BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
-                ContentMarginTopOverride = DefaultGrabberSize
-            };
-            var vScrollBarGrabberHover = new StyleBoxFlat
-            {
-                BackgroundColor = new Color(140, 140, 140).WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
-                ContentMarginTopOverride = DefaultGrabberSize
-            };
-            var vScrollBarGrabberGrabbed = new StyleBoxFlat
-            {
-                BackgroundColor = new Color(160, 160, 160).WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
-                ContentMarginTopOverride = DefaultGrabberSize
-            };
-
-            var hScrollBarGrabberNormal = new StyleBoxFlat
-            {
-                BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize
-            };
-            var hScrollBarGrabberHover = new StyleBoxFlat
-            {
-                BackgroundColor = new Color(140, 140, 140).WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize
-            };
-            var hScrollBarGrabberGrabbed = new StyleBoxFlat
-            {
-                BackgroundColor = new Color(160, 160, 160).WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize
-            };
-
 
             BaseRules = new[]
             {
@@ -165,7 +120,7 @@ namespace Content.Client.Stylesheets
 
                 // Default font.
                 new StyleRule(
-                    new SelectorElement(null, new[] {StyleClassItalic}, null, null),
+                    new SelectorElement(null, new[] {StyleClass.Italic}, null, null),
                     new[]
                     {
                         new StyleProperty("font", notoSans12Italic),
@@ -196,53 +151,6 @@ namespace Content.Client.Stylesheets
                     {
                         new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#753131")),
                     }),
-
-                // Scroll bars
-                new StyleRule(new SelectorElement(typeof(VScrollBar), null, null, null),
-                    new[]
-                    {
-                        new StyleProperty(ScrollBar.StylePropertyGrabber,
-                            vScrollBarGrabberNormal),
-                    }),
-
-                new StyleRule(
-                    new SelectorElement(typeof(VScrollBar), null, null, new[] {ScrollBar.StylePseudoClassHover}),
-                    new[]
-                    {
-                        new StyleProperty(ScrollBar.StylePropertyGrabber,
-                            vScrollBarGrabberHover),
-                    }),
-
-                new StyleRule(
-                    new SelectorElement(typeof(VScrollBar), null, null, new[] {ScrollBar.StylePseudoClassGrabbed}),
-                    new[]
-                    {
-                        new StyleProperty(ScrollBar.StylePropertyGrabber,
-                            vScrollBarGrabberGrabbed),
-                    }),
-
-                new StyleRule(new SelectorElement(typeof(HScrollBar), null, null, null),
-                    new[]
-                    {
-                        new StyleProperty(ScrollBar.StylePropertyGrabber,
-                            hScrollBarGrabberNormal),
-                    }),
-
-                new StyleRule(
-                    new SelectorElement(typeof(HScrollBar), null, null, new[] {ScrollBar.StylePseudoClassHover}),
-                    new[]
-                    {
-                        new StyleProperty(ScrollBar.StylePropertyGrabber,
-                            hScrollBarGrabberHover),
-                    }),
-
-                new StyleRule(
-                    new SelectorElement(typeof(HScrollBar), null, null, new[] {ScrollBar.StylePseudoClassGrabbed}),
-                    new[]
-                    {
-                        new StyleProperty(ScrollBar.StylePropertyGrabber,
-                            hScrollBarGrabberGrabbed),
-                    }),
             };
         }
     }
diff --git a/Content.Client/Stylesheets/StyleClass.cs b/Content.Client/Stylesheets/StyleClass.cs
new file mode 100644 (file)
index 0000000..57f7c22
--- /dev/null
@@ -0,0 +1,66 @@
+namespace Content.Client.Stylesheets;
+
+///
+/// <summary>
+///     A collection of public reusable style classes. These should be general purpose (Not specific to only one element
+///     or Ui).
+/// </summary>
+/// <remarks>
+///     It is named `StyleClass` as opposed to `StyleClasses` because `StyleClasses` is a field on `Control` so it made
+///     it a pain to reference this class from a `Control`. (Weird name is worth typing `StyleClass.OpenBoth` vs.
+///     `Stylesheets.Styleclasses.OpenBoth`)
+/// </remarks>
+public static class StyleClass
+{
+    // These style classes affect more than one type of element
+    public const string Positive = "positive";
+    public const string Negative = "negative";
+    public const string Highlight = "highlight";
+
+    public const string StatusGood = "status-good"; //          Status.GetStatusColor(1.0f)
+    public const string StatusOkay = "status-okay"; //          Status.GetStatusColor(0.75f)
+    public const string StatusWarning = "status-warning"; //    Status.GetStatusColor(0.5f)
+    public const string StatusBad = "status-bad"; //            Status.GetStatusColor(0.25f)
+    public const string StatusCritical = "status-critical"; //  Status.GetStatusColor(0.0f)
+
+    public const string FontLarge = "font-large";
+    public const string FontSmall = "font-small";
+    public const string Italic = "italic";
+    public const string Monospace = "monospace";
+
+    public const string BorderedWindowPanel = "BorderedWindowPanel";
+    public const string AlertWindowHeader = "windowHeaderAlert";
+    public const string WindowContentsContainer = "WindowContentsContainer";
+
+    public const string HighDivider = "HighDivider";
+    public const string LowDivider = "LowDivider";
+
+    public const string LabelHeading = "LabelHeading";
+    public const string LabelHeadingBigger = "LabelHeadingBigger";
+    public const string LabelSubText = "LabelSubText";
+    public const string LabelKeyText = "LabelKeyText";
+    public const string LabelWeak = "LabelWeak"; // replaces `LabelSecondaryColor`
+
+    public const string BackgroundPanel = "BackgroundPanel"; // replaces `AngleRect`
+    public const string BackgroundPanelOpenLeft = "BackgroundPanelOpenLeft"; // replaces `BackgroundOpenLeft`
+    public const string BackgroundPanelOpenRight = "BackgroundPanelOpenRight"; // replaces `BackgroundOpenRight`
+
+    public const string PanelDark = "PanelDark";
+    public const string PanelLight = "PanelLight";
+
+    public const string ButtonOpenRight = "OpenRight";
+    public const string ButtonOpenLeft = "OpenLeft";
+    public const string ButtonOpenBoth = "OpenBoth";
+    public const string ButtonSquare = "ButtonSquare";
+    public const string ButtonSmall = "ButtonSmall";
+    public const string ButtonBig = "ButtonBig";
+
+    public const string CrossButtonRed = "CrossButtonRed";
+
+    public const string ItemStatus = "ItemStatus";
+    public const string ItemStatusNotHeld = "ItemStatusNotHeld";
+
+    public const string TooltipPanel = "TooltipPanel";
+    public const string TooltipTitle = "TooltipTitle";
+    public const string TooltipDesc = "TooltipDesc";
+}
index 2d55accd3e397ea7424fc12222b30f5e497cc223..9bfe5841f2d972463836970b24aa1f48830a1424 100644 (file)
@@ -41,6 +41,8 @@ namespace Content.Client.Stylesheets
 
     }
     // STLYE SHEETS WERE A MISTAKE. KILL ALL OF THIS WITH FIRE
+    [Obsolete("Please use the new sheetlet system to define styles, and remove all references to this class as it may be deleted in the future")]
+    // i did :)
     public sealed class StyleNano : StyleBase
     {
         public const string StyleClassBorderedWindowPanel = "BorderedWindowPanel";
@@ -162,6 +164,19 @@ namespace Content.Client.Stylesheets
         public const string StyleClassPinButtonPinned = "pinButtonPinned";
         public const string StyleClassPinButtonUnpinned = "pinButtonUnpinned";
 
+        // i'm not sure what the missing symbols were referencing, and this is getting obseleted anyway so:
+        public const string ButtonOpenRight = "OpenRight";
+        public const string ButtonOpenLeft = "OpenLeft";
+        public const string ButtonOpenBoth = "OpenBoth";
+        public const string ButtonSquare = "OpenBoth";
+        public const string ButtonCaution = "negative";
+        public const string StyleClassLabelHeading = "LabelHeading";
+        public const string StyleClassLabelSubText = "LabelSubText";
+        public const string StyleClassRedTopButton = "negative";
+        public const string ClassHighDivider = "HighDivider";
+        public const string ClassLowDivider = "LowDivider";
+        public const string ClassAngleRect = "AngleRect";
+
 
         public override Stylesheet Stylesheet { get; }
 
@@ -515,10 +530,8 @@ namespace Content.Client.Stylesheets
             itemListItemBackgroundTransparent.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
             itemListItemBackgroundTransparent.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
 
-            var squareTex = resCache.GetTexture("/Textures/Interface/Nano/square.png");
-            var listContainerButton = new StyleBoxTexture
+            var listContainerButton = new StyleBoxFlat
             {
-                Texture = squareTex,
                 ContentMarginLeftOverride = 10
             };
 
@@ -1096,11 +1109,11 @@ namespace Content.Client.Stylesheets
                 }),
 
                 // small number for the entity counter in the entity menu
-                new StyleRule(new SelectorElement(typeof(Label), new[] {ContextMenuElement.StyleClassEntityMenuIconLabel}, null, null), new[]
-                {
-                    new StyleProperty("font", notoSans10),
-                    new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Right),
-                }),
+                // new StyleRule(new SelectorElement(typeof(Label), new[] {ContextMenuElement.StyleClassEntityMenuIconLabel}, null, null), new[]
+                // {
+                //     new StyleProperty("font", notoSans10),
+                //     new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Right),
+                // }),
 
                 // hotbar slot
                 new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassHotbarSlotNumber}, null, null), new[]
@@ -1287,13 +1300,6 @@ namespace Content.Client.Stylesheets
                         new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorDefault),
                     }),
 
-                new StyleRule(
-                    new SelectorElement(typeof(MenuButton), new[] {MenuButton.StyleClassRedTopButton}, null, new[] {Button.StylePseudoClassNormal}),
-                    new[]
-                    {
-                        new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorDefaultRed),
-                    }),
-
                 new StyleRule(
                     new SelectorElement(typeof(MenuButton), null, null, new[] {Button.StylePseudoClassNormal}),
                     new[]
@@ -1315,20 +1321,6 @@ namespace Content.Client.Stylesheets
                         new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHovered),
                     }),
 
-                new StyleRule(
-                    new SelectorElement(typeof(MenuButton), new[] {MenuButton.StyleClassRedTopButton}, null, new[] {Button.StylePseudoClassHover}),
-                    new[]
-                    {
-                        new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHoveredRed),
-                    }),
-
-                new StyleRule(
-                    new SelectorElement(typeof(Label), new[] {MenuButton.StyleClassLabelTopButton}, null, null),
-                    new[]
-                    {
-                        new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14),
-                    }),
-
                 // MonotoneButton (unfilled)
                 new StyleRule(
                     new SelectorElement(typeof(MonotoneButton), null, null, null),
diff --git a/Content.Client/Stylesheets/StyleProperties.cs b/Content.Client/Stylesheets/StyleProperties.cs
new file mode 100644 (file)
index 0000000..cc6ca12
--- /dev/null
@@ -0,0 +1,10 @@
+namespace Content.Client.Stylesheets;
+
+public sealed class StyleProperties
+{
+    public const string PrimaryPalette = "palette-primary";
+    public const string SecondaryPalette = "palette-secondary";
+    public const string PositivePalette = "palette-positive";
+    public const string NegativePalette = "palette-negative";
+    public const string HighlightPalette = "palette-highlight";
+}
index 3bb4e986af54701366e8682e0bdd851f2081b6b7..637b4999d0199dd8140bb1ac8763ff17cb63c893 100644 (file)
@@ -8,6 +8,7 @@ using static Robust.Client.UserInterface.StylesheetHelpers;
 
 namespace Content.Client.Stylesheets
 {
+    [Obsolete("Please use the new sheetlet system to define styles, and remove all references to this class as it may be deleted in the future")]
     public sealed class StyleSpace : StyleBase
     {
         public static readonly Color SpaceRed = Color.FromHex("#9b2236");
@@ -71,21 +72,21 @@ namespace Content.Client.Stylesheets
 
             Stylesheet = new Stylesheet(BaseRules.Concat(new StyleRule[]
             {
-                Element<Label>().Class(StyleClassLabelHeading)
+                Element<Label>().Class(StyleClass.LabelHeading)
                     .Prop(Label.StylePropertyFont, notoSansBold16)
                     .Prop(Label.StylePropertyFontColor, SpaceRed),
 
-                Element<Label>().Class(StyleClassLabelSubText)
+                Element<Label>().Class(StyleClass.LabelSubText)
                     .Prop(Label.StylePropertyFont, notoSans10)
                     .Prop(Label.StylePropertyFontColor, Color.DarkGray),
 
-                Element<PanelContainer>().Class(ClassHighDivider)
+                Element<PanelContainer>().Class(StyleClass.HighDivider)
                     .Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat
                     {
                         BackgroundColor = SpaceRed, ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2
                     }),
 
-                Element<PanelContainer>().Class(ClassLowDivider)
+                Element<PanelContainer>().Class(StyleClass.LowDivider)
                     .Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat
                     {
                         BackgroundColor = Color.FromHex("#444"),
@@ -98,19 +99,19 @@ namespace Content.Client.Stylesheets
                     .Prop(ContainerButton.StylePropertyStyleBox, BaseButton),
 
                 Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
-                    .Class(ButtonOpenRight)
+                    .Class(StyleClass.ButtonOpenRight)
                     .Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenRight),
 
                 Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
-                    .Class(ButtonOpenLeft)
+                    .Class(StyleClass.ButtonOpenLeft)
                     .Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenLeft),
 
                 Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
-                    .Class(ButtonOpenBoth)
+                    .Class(StyleClass.ButtonOpenBoth)
                     .Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenBoth),
 
                 Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
-                    .Class(ButtonSquare)
+                    .Class(StyleClass.ButtonSquare)
                     .Prop(ContainerButton.StylePropertyStyleBox, BaseButtonSquare),
 
                 // Colors for the buttons.
@@ -131,19 +132,19 @@ namespace Content.Client.Stylesheets
                     .Prop(Control.StylePropertyModulateSelf, ButtonColorDisabled),
 
                 // Colors for the caution buttons.
-                Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(ButtonCaution)
+                Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(StyleClass.Negative)
                     .Pseudo(ContainerButton.StylePseudoClassNormal)
                     .Prop(Control.StylePropertyModulateSelf, ButtonColorCautionDefault),
 
-                Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(ButtonCaution)
+                Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(StyleClass.Negative)
                     .Pseudo(ContainerButton.StylePseudoClassHover)
                     .Prop(Control.StylePropertyModulateSelf, ButtonColorCautionHovered),
 
-                Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(ButtonCaution)
+                Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(StyleClass.Negative)
                     .Pseudo(ContainerButton.StylePseudoClassPressed)
                     .Prop(Control.StylePropertyModulateSelf, ButtonColorCautionPressed),
 
-                Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(ButtonCaution)
+                Element<ContainerButton>().Class(ContainerButton.StyleClassButton).Class(StyleClass.Negative)
                     .Pseudo(ContainerButton.StylePseudoClassDisabled)
                     .Prop(Control.StylePropertyModulateSelf, ButtonColorCautionDisabled),
 
@@ -151,7 +152,7 @@ namespace Content.Client.Stylesheets
                 Element<Label>().Class(ContainerButton.StyleClassButton)
                     .Prop(Label.StylePropertyAlignMode, Label.AlignMode.Center),
 
-                Element<PanelContainer>().Class(ClassAngleRect)
+                Element<PanelContainer>().Class(StyleClass.BackgroundPanel)
                     .Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
                     .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#202030")),
 
diff --git a/Content.Client/Stylesheets/StylesheetHelpers.cs b/Content.Client/Stylesheets/StylesheetHelpers.cs
new file mode 100644 (file)
index 0000000..2cd2ec4
--- /dev/null
@@ -0,0 +1,171 @@
+using System.Numerics;
+using Robust.Client.Graphics;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Robust.Client.UserInterface.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets;
+
+public static class StylesheetHelpers
+{
+    public static MutableSelector Modulate(this MutableSelector selector, Color modulate)
+    {
+        return selector.Prop(Control.StylePropertyModulateSelf, modulate);
+    }
+
+    public static MutableSelector Margin(this MutableSelector selector, Thickness margin)
+    {
+        return selector.Prop(nameof(Control.Margin), margin);
+    }
+
+    public static MutableSelector Margin(this MutableSelector selector, float margin)
+    {
+        return selector.Margin(new Thickness(margin));
+    }
+
+    public static MutableSelector MinWidth(this MutableSelector selector, float width)
+    {
+        return selector.Prop(nameof(Control.MinWidth), width);
+    }
+
+    public static MutableSelector MinHeight(this MutableSelector selector, float height)
+    {
+        return selector.Prop(nameof(Control.MinHeight), height);
+    }
+
+    public static MutableSelector MinSize(this MutableSelector selector, Vector2 size)
+    {
+        return selector.MinWidth(size.X).MinHeight(size.Y);
+    }
+
+    public static MutableSelector MaxWidth(this MutableSelector selector, float width)
+    {
+        return selector.Prop(nameof(Control.MaxWidth), width);
+    }
+
+    public static MutableSelector MaxHeight(this MutableSelector selector, float height)
+    {
+        return selector.Prop(nameof(Control.MaxHeight), height);
+    }
+
+    public static MutableSelector MaxSize(this MutableSelector selector, Vector2 size)
+    {
+        return selector.MaxWidth(size.X).MaxHeight(size.Y);
+    }
+
+    public static MutableSelector SetWidth(this MutableSelector selector, float width)
+    {
+        return selector.Prop(nameof(Control.SetWidth), width);
+    }
+
+    public static MutableSelector SetHeight(this MutableSelector selector, float height)
+    {
+        return selector.Prop(nameof(Control.SetHeight), height);
+    }
+
+    public static MutableSelector SetSize(this MutableSelector selector, Vector2 size)
+    {
+        return selector.SetWidth(size.X).SetHeight(size.Y);
+    }
+
+    public static MutableSelector HorizontalExpand(this MutableSelector selector, bool val)
+    {
+        return selector.Prop(nameof(Control.HorizontalExpand), val);
+    }
+
+    public static MutableSelector VerticalExpand(this MutableSelector selector, bool val)
+    {
+        return selector.Prop(nameof(Control.VerticalExpand), val);
+    }
+
+    public static MutableSelector HorizontalAlignment(this MutableSelector selector, Control.HAlignment val)
+    {
+        return selector.Prop(nameof(Control.HorizontalExpand), val);
+    }
+
+    public static MutableSelector VerticalAlignment(this MutableSelector selector, Control.VAlignment val)
+    {
+        return selector.Prop(nameof(Control.VerticalExpand), val);
+    }
+
+    public static MutableSelector AlignMode(this MutableSelector selector, Label.AlignMode mode)
+    {
+        return selector.Prop(Label.StylePropertyAlignMode, mode);
+    }
+
+    // Pseudo class helpers
+
+    public static MutableSelectorElement PseudoNormal(this MutableSelectorElement selector)
+    {
+        return selector.Pseudo(ContainerButton.StylePseudoClassNormal);
+    }
+
+    public static MutableSelectorElement PseudoHovered(this MutableSelectorElement selector)
+    {
+        return selector.Pseudo(ContainerButton.StylePseudoClassHover);
+    }
+
+    public static MutableSelectorElement PseudoPressed(this MutableSelectorElement selector)
+    {
+        return selector.Pseudo(ContainerButton.StylePseudoClassPressed);
+    }
+
+    public static MutableSelectorElement PseudoDisabled(this MutableSelectorElement selector)
+    {
+        return selector.Pseudo(ContainerButton.StylePseudoClassDisabled);
+    }
+
+    public static MutableSelectorElement MaybeClass(this MutableSelectorElement selector, string? styleclass)
+    {
+        if (styleclass is { } c)
+            return selector.Class(c);
+
+        return selector;
+    }
+
+    public static MutableSelectorElement E<T>() where T : Control
+    {
+        return new MutableSelectorElement { Type = typeof(T) };
+    }
+
+    public static MutableSelectorElement E()
+    {
+        return new MutableSelectorElement();
+    }
+
+    public static MutableSelector Panel(this MutableSelector selector, StyleBox panel)
+    {
+        return selector.Prop(PanelContainer.StylePropertyPanel, panel);
+    }
+
+    public static MutableSelector Box(this MutableSelector selector, StyleBox box)
+    {
+        return selector.Prop(ContainerButton.StylePropertyStyleBox, box);
+    }
+
+    public static MutableSelector Font(this MutableSelector selector, Font font)
+    {
+        return selector.Prop(Label.StylePropertyFont, font);
+    }
+
+    public static MutableSelector FontColor(this MutableSelector selector, Color fontColor)
+    {
+        return selector.Prop(Label.StylePropertyFontColor, fontColor);
+    }
+
+    public static StyleBoxTexture IntoPatch(this Texture texture, StyleBox.Margin patchMargin, float amount)
+    {
+        var stylebox = new StyleBoxTexture
+        {
+            Texture = texture,
+        };
+        stylebox.SetPatchMargin(patchMargin, amount);
+
+        return stylebox;
+    }
+
+    public static MutableSelectorChild ParentOf(this MutableSelector selector, MutableSelector other)
+    {
+        return Child().Parent(selector).Child(other);
+    }
+}
index 4c767bd554ecf0e6d138248a22f138fbaa89c2c3..b03fcdf4976fb6e86a493b0335d2ee9bf13b33d5 100644 (file)
@@ -1,23 +1,79 @@
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using Content.Client.Stylesheets.Stylesheets;
 using Robust.Client.ResourceManagement;
 using Robust.Client.UserInterface;
-using Robust.Shared.IoC;
+using Robust.Shared.Reflection;
 
 namespace Content.Client.Stylesheets
 {
     public sealed class StylesheetManager : IStylesheetManager
     {
+        [Dependency] private readonly ILogManager _logManager = default!;
         [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
-        [Dependency] private readonly IResourceCache _resourceCache = default!;
+        [Dependency] private readonly IReflectionManager _reflection = default!;
 
+        [Dependency]
+        private readonly IResourceCache
+            _resCache = default!; // TODO: REMOVE (obsolete; used to construct StyleNano/StyleSpace)
+
+        public Stylesheet SheetNanotrasen { get; private set; } = default!;
+        public Stylesheet SheetSystem { get; private set; } = default!;
+
+        [Obsolete("Update to use SheetNanotrasen instead")]
         public Stylesheet SheetNano { get; private set; } = default!;
+
+        [Obsolete("Update to use SheetSystem instead")]
         public Stylesheet SheetSpace { get; private set; } = default!;
 
+        private Dictionary<string, Stylesheet> Stylesheets { get; set; } = default!;
+
+        public bool TryGetStylesheet(string name, [MaybeNullWhen(false)] out Stylesheet stylesheet)
+        {
+            return Stylesheets.TryGetValue(name, out stylesheet);
+        }
+
+        public HashSet<Type> UnusedSheetlets { get; private set; } = [];
+
         public void Initialize()
         {
-            SheetNano = new StyleNano(_resourceCache).Stylesheet;
-            SheetSpace = new StyleSpace(_resourceCache).Stylesheet;
+            var sawmill = _logManager.GetSawmill("style");
+            sawmill.Debug("Initializing Stylesheets...");
+            var sw = Stopwatch.StartNew();
 
-            _userInterfaceManager.Stylesheet = SheetNano;
+            // add all sheetlets to the hashset
+            var tys = _reflection.FindTypesWithAttribute<CommonSheetletAttribute>();
+            UnusedSheetlets = [..tys];
+
+            Stylesheets = new Dictionary<string, Stylesheet>();
+            SheetNanotrasen = Init(new NanotrasenStylesheet(new BaseStylesheet.NoConfig(), this));
+            SheetSystem = Init(new SystemStylesheet(new BaseStylesheet.NoConfig(), this));
+            SheetNano = new StyleNano(_resCache).Stylesheet; // TODO: REMOVE (obsolete)
+            SheetSpace = new StyleSpace(_resCache).Stylesheet; // TODO: REMOVE (obsolete)
+
+            _userInterfaceManager.Stylesheet = SheetNanotrasen;
+
+            // warn about unused sheetlets
+            if (UnusedSheetlets.Count > 0)
+            {
+                var sheetlets = UnusedSheetlets.AsEnumerable()
+                    .Take(5)
+                    .Select(t => t.FullName ?? "<could not get FullName>")
+                    .ToArray();
+                sawmill.Error($"There are unloaded sheetlets: {string.Join(", ", sheetlets)}");
+            }
+
+            sawmill.Debug($"Initialized {_styleRuleCount} style rules in {sw.Elapsed}");
+        }
+
+        private int _styleRuleCount;
+
+        private Stylesheet Init(BaseStylesheet baseSheet)
+        {
+            Stylesheets.Add(baseSheet.StylesheetName, baseSheet.Stylesheet);
+            _styleRuleCount += baseSheet.Stylesheet.Rules.Count;
+            return baseSheet.Stylesheet;
         }
     }
 }
diff --git a/Content.Client/Stylesheets/Stylesheets/NanotrasenStylesheet.Palettes.cs b/Content.Client/Stylesheets/Stylesheets/NanotrasenStylesheet.Palettes.cs
new file mode 100644 (file)
index 0000000..df19015
--- /dev/null
@@ -0,0 +1,12 @@
+using Content.Client.Stylesheets.Palette;
+
+namespace Content.Client.Stylesheets.Stylesheets;
+
+public sealed partial class NanotrasenStylesheet
+{
+    public override ColorPalette PrimaryPalette => Palettes.Navy;
+    public override ColorPalette SecondaryPalette => Palettes.Slate;
+    public override ColorPalette PositivePalette => Palettes.Green;
+    public override ColorPalette NegativePalette => Palettes.Red;
+    public override ColorPalette HighlightPalette => Palettes.Gold;
+}
diff --git a/Content.Client/Stylesheets/Stylesheets/NanotrasenStylesheet.cs b/Content.Client/Stylesheets/Stylesheets/NanotrasenStylesheet.cs
new file mode 100644 (file)
index 0000000..eb8472d
--- /dev/null
@@ -0,0 +1,62 @@
+using System.Linq;
+using Content.Client.Stylesheets.Fonts;
+using Robust.Client.ResourceManagement;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using Robust.Shared.Utility;
+using static Robust.Client.UserInterface.StylesheetHelpers;
+
+namespace Content.Client.Stylesheets.Stylesheets;
+
+[Virtual]
+public partial class NanotrasenStylesheet : CommonStylesheet
+{
+    public override string StylesheetName => "Nanotrasen";
+
+    public override NotoFontFamilyStack BaseFont { get; } // TODO: NotoFontFamilyStack is temporary
+
+
+    public static readonly ResPath TextureRoot = new("/Textures/Interface/Nano");
+
+    public override Dictionary<Type, ResPath[]> Roots => new()
+    {
+        { typeof(TextureResource), [TextureRoot] },
+    };
+
+    private const int PrimaryFontSize = 12;
+    private const int FontSizeStep = 2;
+
+    // why? see InterfaceStylesheet.cs
+    // ReSharper disable once UseCollectionExpression
+    private readonly List<(string?, int)> _commonFontSizes = new()
+    {
+        (null, PrimaryFontSize),
+        (StyleClass.FontSmall, PrimaryFontSize - FontSizeStep),
+        (StyleClass.FontLarge, PrimaryFontSize + FontSizeStep),
+    };
+
+    public NanotrasenStylesheet(object config, StylesheetManager man) : base(config)
+    {
+        BaseFont = new NotoFontFamilyStack(ResCache);
+        var rules = new[]
+        {
+            // Set up important rules that need to go first.
+            GetRulesForFont(null, BaseFont, _commonFontSizes),
+            // Set up our core rules.
+            [
+                // Declare the default font.
+                Element().Prop(Label.StylePropertyFont, BaseFont.GetFont(PrimaryFontSize)),
+                // Branding.
+                Element<TextureRect>()
+                    .Class("NTLogoDark")
+                    .Prop(TextureRect.StylePropertyTexture, GetTexture(new ResPath("ntlogo.svg.png")))
+                    .Prop(Control.StylePropertyModulateSelf, Color.FromHex("#757575")),
+            ],
+            // Finally, load all the other sheetlets.
+            GetAllSheetletRules<PalettedStylesheet, CommonSheetletAttribute>(man),
+            GetAllSheetletRules<NanotrasenStylesheet, CommonSheetletAttribute>(man),
+        };
+
+        Stylesheet = new Stylesheet(rules.SelectMany(x => x).ToArray());
+    }
+}
diff --git a/Content.Client/Stylesheets/Stylesheets/SystemStylesheet.Palettes.cs b/Content.Client/Stylesheets/Stylesheets/SystemStylesheet.Palettes.cs
new file mode 100644 (file)
index 0000000..6d8430b
--- /dev/null
@@ -0,0 +1,12 @@
+using Content.Client.Stylesheets.Palette;
+
+namespace Content.Client.Stylesheets.Stylesheets;
+
+public partial class SystemStylesheet
+{
+    public override ColorPalette PrimaryPalette => Palettes.Cyan;
+    public override ColorPalette SecondaryPalette => Palettes.Neutral;
+    public override ColorPalette PositivePalette => Palettes.Green;
+    public override ColorPalette NegativePalette => Palettes.Red;
+    public override ColorPalette HighlightPalette => Palettes.Maroon;
+}
diff --git a/Content.Client/Stylesheets/Stylesheets/SystemStylesheet.cs b/Content.Client/Stylesheets/Stylesheets/SystemStylesheet.cs
new file mode 100644 (file)
index 0000000..d8c2dd2
--- /dev/null
@@ -0,0 +1,56 @@
+using System.Linq;
+using Content.Client.Stylesheets.Fonts;
+using Robust.Client.ResourceManagement;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using Robust.Shared.Utility;
+using static Robust.Client.UserInterface.StylesheetHelpers;
+
+
+namespace Content.Client.Stylesheets.Stylesheets;
+
+[Virtual]
+public partial class SystemStylesheet : CommonStylesheet
+{
+    public override string StylesheetName => "System";
+
+    public override NotoFontFamilyStack BaseFont { get; } // TODO: NotoFontFamilyStack is temporary
+
+    public override Dictionary<Type, ResPath[]> Roots => new()
+    {
+        { typeof(TextureResource), [] },
+    };
+
+    private const int PrimaryFontSize = 12;
+    private const int FontSizeStep = 2;
+
+    // for some GOD FORSAKEN REASON if I use a collection expression here it throws a sandbox error
+    // Thanks ReSharper, this was very fun to find in the ~40 files I last committed
+    // ReSharper disable once UseCollectionExpression
+    private readonly List<(string?, int)> _commonFontSizes = new()
+    {
+        (null, PrimaryFontSize),
+        (StyleClass.FontSmall, PrimaryFontSize - FontSizeStep),
+        (StyleClass.FontLarge, PrimaryFontSize + FontSizeStep),
+    };
+
+    public SystemStylesheet(object config, StylesheetManager man) : base(config)
+    {
+        BaseFont = new NotoFontFamilyStack(ResCache);
+        var rules = new[]
+        {
+            // Set up important rules that need to go first.
+            GetRulesForFont(null, BaseFont, _commonFontSizes),
+            // Set up our core rules.
+            [
+                // Declare the default font.
+                Element().Prop(Label.StylePropertyFont, BaseFont.GetFont(PrimaryFontSize)),
+            ],
+            // Finally, load all the other sheetlets.
+            GetAllSheetletRules<PalettedStylesheet, CommonSheetletAttribute>(man),
+            GetAllSheetletRules<SystemStylesheet, CommonSheetletAttribute>(man),
+        };
+
+        Stylesheet = new Stylesheet(rules.SelectMany(x => x).ToArray());
+    }
+}
index 25d5907b055ac47adc74d133f57149260b682cb4..879f1fd9b5692e560d6c5204d374fd7663153a71 100644 (file)
@@ -36,7 +36,7 @@ namespace Content.Client.Tabletop
         private float _timePassed; // Time passed since last update sent to the server.
         private EntityUid? _draggedEntity; // Entity being dragged
         private ScalingViewport? _viewport; // Viewport currently being used
-        private DefaultWindow? _window; // Current open tabletop window (only allow one at a time)
+        private BaseWindow? _window; // Current open tabletop window (only allow one at a time)
         private EntityUid? _table; // The table entity of the currently open game session
 
         public override void Initialize()
index 0d8b5e24f7e2b68a0ffbbf5841d7f8db9fef2955..817de210315eba4efe1e9a401128d6ebecf61627 100644 (file)
@@ -8,7 +8,7 @@
                        </PanelContainer.PanelOverride>
                        <BoxContainer Orientation="Vertical" HorizontalExpand="True">
                        <GridContainer Margin="5" Columns="2" MinSize="600 0">
-                               <Label Name="SetName" Text="Set" StyleClasses="StatusFieldTitle"></Label>
+                               <Label Name="SetName" Text="Set" StyleClasses="highlight"></Label>
                                <Button Margin="0 10" Name="SetButton" Text="Select" StyleClasses="OpenRight" Access="Public" HorizontalAlignment="Right"/>
                        </GridContainer>
                        <controls:HLine Color="#404040" Thickness="1" Margin="0 5"/>
index 5a7aeb5cb44a3954134fb19056ba76e1aab544c3..8748a51a4f985e1779ced6269bbc3e75dbdd751a 100644 (file)
@@ -15,7 +15,7 @@ namespace Content.Client.Tools.Components
         public MultipleToolStatusControl(MultipleToolComponent parent)
         {
             _parent = parent;
-            _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+            _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
             _label.SetMarkup(_parent.StatusShowBehavior ? _parent.CurrentQualityName : string.Empty);
             AddChild(_label);
         }
index 3d44d6fa84a193f85095baf02144c2eef2f63b5f..de56286641b4b71bdd5599c31c9c54a4e843fb7b 100644 (file)
@@ -20,7 +20,7 @@ public sealed class WelderStatusControl : PollingItemStatusControl<WelderStatusC
         _parent = parent;
         _entityManager = entityManager;
         _toolSystem = toolSystem;
-        _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+        _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
         AddChild(_label);
 
         UpdateDraw();
index 6195d6aea85bc5e9d5c188533ee32034d833c734..3ec29054ae9c56ad603372ed7047d94d170c54ff 100644 (file)
@@ -3,12 +3,12 @@
                       xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
                       MouseFilter="Stop"
                       MinWidth="200" MinHeight="150">
-    <PanelContainer StyleClasses="AngleRect" />
+    <PanelContainer StyleClasses="BackgroundPanel" />
 
     <BoxContainer Orientation="Vertical">
         <Control>
-            <PanelContainer StyleClasses="WindowHeadingBackground" />
-            <BoxContainer Margin="4 2 8 0" Orientation="Horizontal">
+            <PanelContainer StyleClasses="WindowHeadingBackground" Name="WindowHeader" />
+            <BoxContainer Margin="4 2 4 0" Orientation="Horizontal">
                 <Label Name="WindowTitle"
                        HorizontalExpand="True" VAlign="Center" StyleClasses="FancyWindowTitle" ClipText="true" />
                 <TextureButton Name="HelpButton" StyleClasses="windowHelpButton" VerticalAlignment="Center" Disabled="True" Visible="False" Access="Public" />
@@ -17,6 +17,6 @@
             </BoxContainer>
         </Control>
         <PanelContainer StyleClasses="LowDivider" />
-        <Control Access="Public" Name="ContentsContainer" Margin="0 2" RectClipContent="True" VerticalExpand="true" />
+        <Control Access="Public" Name="ContentsContainer" StyleClasses="WindowContentsContainer" RectClipContent="True" VerticalExpand="true" />
     </BoxContainer>
 </controls:FancyWindow>
index 71d0066a797fd55e72381b15cd5ffdbc960402a9..a761ab2e1d7ed7b7908355e10db520c3a0408cfe 100644 (file)
@@ -1,6 +1,7 @@
 using System.Numerics;
 using Content.Client.Guidebook;
 using Content.Client.Guidebook.Components;
+using Content.Client.Stylesheets;
 using Content.Shared.Guidebook;
 using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.CustomControls;
@@ -14,13 +15,17 @@ namespace Content.Client.UserInterface.Controls
     public partial class FancyWindow : BaseWindow
     {
         [Dependency] private readonly IEntitySystemManager _sysMan = default!;
+        [Dependency] private readonly IStylesheetManager _styleMan = default!;
         private GuidebookSystem? _guidebookSystem;
         private const int DRAG_MARGIN_SIZE = 7;
+
         public const string StyleClassWindowHelpButton = "windowHelpButton";
+        public const string StyleClassWindowCloseButton = "windowCloseButton";
 
         public FancyWindow()
         {
             RobustXamlLoader.Load(this);
+            IoCManager.InjectDependencies(this);
 
             CloseButton.OnPressed += _ => Close();
             HelpButton.OnPressed += _ => Help();
@@ -33,7 +38,21 @@ namespace Content.Client.UserInterface.Controls
             set => WindowTitle.Text = value;
         }
 
+        private string? _stylesheet;
+
+        public new string? Stylesheet
+        {
+            get => _stylesheet;
+            set
+            {
+                _stylesheet = value;
+                if (value is not null && _styleMan.TryGetStylesheet(value, out var stylesheet))
+                    base.Stylesheet = stylesheet;
+            }
+        }
+
         private List<ProtoId<GuideEntryPrototype>>? _helpGuidebookIds;
+
         public List<ProtoId<GuideEntryPrototype>>? HelpGuidebookIds
         {
             get => _helpGuidebookIds;
@@ -80,6 +99,9 @@ namespace Content.Client.UserInterface.Controls
 
             return mode;
         }
+
+        public string HeaderClass { set => WindowHeader.SetOnlyStyleClass(value); }
+        public string TitleClass { set => WindowTitle.SetOnlyStyleClass(value); }
     }
 
     /// <summary>
index 656768cd2b6203f99c1f7504564fc4db3be8be1e..849f5003d038d84eb5a83809852fe164f2c96b9e 100644 (file)
@@ -6,41 +6,36 @@ using Robust.Shared.Maths;
 
 namespace Content.Client.UserInterface.Controls;
 
-public sealed class HLine : Container
+public sealed class HLine : PanelContainer
 {
     public Color? Color
     {
         get
         {
-            if (_line.PanelOverride is StyleBoxFlat styleBox) return styleBox.BackgroundColor;
-            return null;
-        }
-        set
-        {
-            if (_line.PanelOverride is StyleBoxFlat styleBox) styleBox.BackgroundColor = value!.Value;
-        }
-    }
+            StyleBox box;
+            if (PanelOverride != null)
+                box = PanelOverride;
+            if (TryGetStyleProperty<StyleBox>(StylePropertyPanel, out var _box))
+                box = _box;
+            else
+                return null;
 
-    public float? Thickness {
-        get
-        {
-            if (_line.PanelOverride is StyleBoxFlat styleBox) return styleBox.ContentMarginTopOverride;
+            if (box is StyleBoxFlat boxFlat)
+                return boxFlat.BackgroundColor;
             return null;
         }
-        set
-        {
-            if (_line.PanelOverride is StyleBoxFlat styleBox) styleBox.ContentMarginTopOverride = value!.Value;
-        }
+        set =>
+            // should use style classes instead in ui code but keeping this functionality for consistency
+            PanelOverride = new StyleBoxFlat() { BackgroundColor = value!.Value };
     }
 
-    private readonly PanelContainer _line;
+    public float? Thickness
+    {
+        get => MinHeight;
+        set => MinHeight = value!.Value;
+    }
 
     public HLine()
     {
-        _line = new PanelContainer();
-        _line.PanelOverride = new StyleBoxFlat();
-        _line.PanelOverride.ContentMarginTopOverride = Thickness;
-        AddChild(_line);
     }
-
 }
index c71dba31b1c965711e9475e80c82c60295ae20fb..1b15badcb20f1fd76e79451f4e6d6040ae70c56f 100644 (file)
@@ -8,7 +8,7 @@ namespace Content.Client.UserInterface.Controls
     {
         public HighDivider()
         {
-            Children.Add(new PanelContainer {StyleClasses = {StyleBase.ClassHighDivider}});
+            Children.Add(new PanelContainer {StyleClasses = {StyleClass.HighDivider}});
         }
     }
 }
index 0bd7d322156dadb2febb9bc39c24ff4e7c610935..53dddf110c573bc9928343e29de461b3195811b1 100644 (file)
@@ -1,6 +1,7 @@
 using System.Linq;
 using System.Numerics;
 using JetBrains.Annotations;
+using Robust.Client.Graphics;
 using Robust.Client.UserInterface;
 using Robust.Client.UserInterface.Controls;
 using Robust.Shared.Input;
@@ -385,6 +386,7 @@ public sealed class ListContainerButton : ContainerButton, IEntityControl
         AddStyleClass(StyleClassButton);
         Data = data;
         Index = index;
+        StyleBoxOverride = new StyleBoxFlat(Color.White);
         // AddChild(Background = new PanelContainer
         // {
         //     HorizontalExpand = true,
index a0ba21da74465cbd7bfddf4a183844984cf7fee6..24767c2201d19bda5108e6dc7bbea25abd96cddd 100644 (file)
@@ -13,17 +13,14 @@ public sealed class MenuButton : ContainerButton
 {
     [Dependency] private readonly IInputManager _inputManager = default!;
     public const string StyleClassLabelTopButton = "topButtonLabel";
-    public const string StyleClassRedTopButton = "topButtonLabel";
+    // public const string StyleClassRedTopButton = "topButtonLabel";
 
-    private static readonly Color ColorNormal = Color.FromHex("#7b7e9e");
-    private static readonly Color ColorRedNormal = Color.FromHex("#FEFEFE");
-    private static readonly Color ColorHovered = Color.FromHex("#9699bb");
-    private static readonly Color ColorRedHovered = Color.FromHex("#FFFFFF");
-    private static readonly Color ColorPressed = Color.FromHex("#789B8C");
+    // TODO: KIIIIIILLLLLLLLLLLLLLLLLLLLLLLLLLL --kaylie.
+    private static readonly Color ColorNormal = Color.FromHex("#99a7b3"); // primary color[0] + 0.24 L
+    private static readonly Color ColorHovered = Color.FromHex("#acbac6"); // primary color[0] + 0.30 L
+    private static readonly Color ColorPressed = Color.FromHex("#75838e"); // primary color[0] + 0.12 L
 
-    private const float VertPad = 8f;
-    private Color NormalColor => HasStyleClass(StyleClassRedTopButton) ? ColorRedNormal : ColorNormal;
-    private Color HoveredColor => HasStyleClass(StyleClassRedTopButton) ? ColorRedHovered : ColorHovered;
+    private const float VertPad = 4f;
 
     private BoundKeyFunction? _function;
     private readonly BoxContainer _root;
@@ -55,14 +52,14 @@ public sealed class MenuButton : ContainerButton
             VerticalAlignment = VAlignment.Center,
             VerticalExpand = true,
             Margin = new Thickness(0, VertPad),
-            ModulateSelfOverride = NormalColor,
+            ModulateSelfOverride = ColorNormal,
             Stretch = TextureRect.StretchMode.KeepCentered
         };
         _buttonLabel = new Label
         {
             Text = "",
             HorizontalAlignment = HAlignment.Center,
-            ModulateSelfOverride = NormalColor,
+            ModulateSelfOverride = ColorNormal,
             StyleClasses = {StyleClassLabelTopButton}
         };
         _root = new BoxContainer
@@ -116,8 +113,8 @@ public sealed class MenuButton : ContainerButton
         switch (DrawMode)
         {
             case DrawModeEnum.Normal:
-                _buttonIcon.ModulateSelfOverride = NormalColor;
-                _buttonLabel.ModulateSelfOverride = NormalColor;
+                _buttonIcon.ModulateSelfOverride = ColorNormal;
+                _buttonLabel.ModulateSelfOverride = ColorNormal;
                 break;
 
             case DrawModeEnum.Pressed:
@@ -126,8 +123,8 @@ public sealed class MenuButton : ContainerButton
                 break;
 
             case DrawModeEnum.Hover:
-                _buttonIcon.ModulateSelfOverride = HoveredColor;
-                _buttonLabel.ModulateSelfOverride = HoveredColor;
+                _buttonIcon.ModulateSelfOverride = ColorHovered;
+                _buttonLabel.ModulateSelfOverride = ColorHovered;
                 break;
 
             case DrawModeEnum.Disabled:
index a02ac0835df2470c337b657a7c3f66a5464fa8c0..2ba0371d337d9aac546f8a9d066c00344b2ba61e 100644 (file)
@@ -14,7 +14,7 @@ namespace Content.Client.UserInterface.Controls
             {
                 Children = {(_label = new Label
                 {
-                    StyleClasses = {StyleNano.StyleClassLabelHeading}
+                    StyleClasses = {StyleClass.LabelHeading}
                 })}
             };
             AddChild(_panel);
index 54aeffe72c97168cc1b8ecc52ef20af34f2e2745..6ef0e995204ab65c4971f9de36cd8d0bb281ae4f 100644 (file)
@@ -18,7 +18,7 @@
     </LayoutContainer>
     <BoxContainer Name="TopLeft" Access="Protected" Orientation="Vertical">
         <BoxContainer Orientation="Horizontal">
-            <menuBar:GameTopMenuBar Name="TopBar" Access="Protected" />
+            <menuBar:GameTopMenuBar Name="TopBar" Access="Public" />
             <!-- Buffer so big votes don't skew it -->
             <Control/>
         </BoxContainer>
index 653302fae4c1fd39f956d4cf1ef4cc030c8cfe67..3e5ccc64866463ee093e55248a3a2a0b7ddb56a5 100644 (file)
@@ -32,8 +32,8 @@
             </PanelContainer.PanelOverride>
 
             <BoxContainer Orientation="Vertical" HorizontalExpand="True" SeparationOverride="10" Margin="10">
-                <menuBar:GameTopMenuBar Name="TopBar" HorizontalExpand="True" Access="Protected" />
-                <chat:ChatBox VerticalExpand="True" HorizontalExpand="True" Name="Chat" Access="Protected" MinSize="0 0"/>
+                <menuBar:GameTopMenuBar Name="TopBar" HorizontalExpand="True" Access="Public" />
+                <chat:ChatBox StyleClasses="ChatOutput" VerticalExpand="True" HorizontalExpand="True" Name="Chat" Access="Protected" MinSize="0 0"/>
             </BoxContainer>
         </PanelContainer>
     </SplitContainer>
index 2892ca44254d50212e636cc0cd51e5a9317f004f..9fe95c63f102fd40b9662589d4c335e4e521058c 100644 (file)
@@ -1,4 +1,5 @@
 using System.Numerics;
+using Content.Client.Stylesheets;
 using Content.Client.UserInterface.Systems.Chat.Widgets;
 using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.Controls;
@@ -9,6 +10,9 @@ namespace Content.Client.UserInterface.Screens;
 [GenerateTypedNameReferences]
 public sealed partial class SeparatedChatGameScreen : InGameScreen
 {
+    public const string StyleClassChatContainer = "ChatContainer";
+    public const string StyleClassChatOutput = "ChatOutput";
+
     public SeparatedChatGameScreen()
     {
         RobustXamlLoader.Load(this);
index be3af28b157a6ee6b5a4b04d73924397b728244c..ec66e4a9da21e119b9919e7d1e930aa45c4439a2 100644 (file)
@@ -22,6 +22,8 @@ namespace Content.Client.UserInterface.Systems.Actions.Controls;
 
 public sealed class ActionButton : Control, IEntityControl
 {
+    public const string StyleClassActionHighlightRect = "ActionHighlightRect";
+
     private IEntityManager _entities;
     private IPlayerManager _player;
     private SpriteSystem? _spriteSys;
@@ -79,7 +81,7 @@ public sealed class ActionButton : Control, IEntityControl
         };
         HighlightRect = new PanelContainer
         {
-            StyleClasses = {StyleNano.StyleClassHandSlotHighlight},
+            StyleClasses = { StyleClassActionHighlightRect },
             MinSize = new Vector2(32, 32),
             Visible = false
         };
diff --git a/Content.Client/UserInterface/Systems/Actions/Controls/ActionTooltip.xaml b/Content.Client/UserInterface/Systems/Actions/Controls/ActionTooltip.xaml
deleted file mode 100644 (file)
index 22893cc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<controls:ActionTooltip
-    xmlns="https://spacestation14.io"
-    xmlns:controls="clr-namespace:Content.Client.UserInterface.Systems.Actions.Controls"
-    StyleClasses="StyleClassTooltipPanel">
-    <BoxContainer Orientation="Vertical" RectClipContent="True">
-        <RichTextLabel MaxWidth="350" StyleClasses="StyleClassTooltipActionTitle"/>
-        <RichTextLabel MaxWidth="350" StyleClasses="StyleClassTooltipActionDescription"/>
-        <RichTextLabel MaxWidth="350" StyleClasses="StyleClassTooltipActionCharges"/>
-    </BoxContainer>
-</controls:ActionTooltip>
diff --git a/Content.Client/UserInterface/Systems/Actions/Controls/ActionTooltip.xaml.cs b/Content.Client/UserInterface/Systems/Actions/Controls/ActionTooltip.xaml.cs
deleted file mode 100644 (file)
index 92d9b50..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-using Robust.Client.AutoGenerated;
-using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.XAML;
-
-namespace Content.Client.UserInterface.Systems.Actions.Controls;
-
-[GenerateTypedNameReferences]
-public sealed partial class ActionTooltip : PanelContainer
-{
-    public ActionTooltip()
-    {
-        RobustXamlLoader.Load(this);
-    }
-}
index f972a96eb74fb877000d12ab4279c02de239cb3a..4aaabb3d05dcccbd2c164473889b70f6ea3b3bc4 100644 (file)
@@ -8,6 +8,8 @@ namespace Content.Client.UserInterface.Systems.Actions.Windows;
 [GenerateTypedNameReferences]
 public sealed partial class ActionsWindow : DefaultWindow
 {
+    public const string StyleClassActionSearchBox = "actionSearchBox";
+
     public MultiselectOptionButton<Filters> FilterButton { get; private set; }
 
     /// <summary>
index 2b06eb7f8dc086c621ea6d58321cf8964e8d81d9..96a965f2bd9f9d79b3e42c9537e005c4bb40f924 100644 (file)
@@ -95,7 +95,7 @@ public sealed class GasTankWindow
         _topLabel = new Label
         {
             FontOverride = font,
-            FontColorOverride = StyleNano.NanoGold,
+           StyleClasses = { StyleClass.LabelKeyText },
             VerticalAlignment = VAlignment.Center,
             HorizontalExpand = true,
             HorizontalAlignment = HAlignment.Left,
index 3f0afc2fab0a14dccd602379a99321fd399a8d0a..d09511040ba71513034eaf0be89588f5fd07f1c5 100644 (file)
@@ -250,15 +250,15 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
 
     private void UnreadAHelpReceived()
     {
-        GameAHelpButton?.StyleClasses.Add(MenuButton.StyleClassRedTopButton);
-        LobbyAHelpButton?.StyleClasses.Add(StyleNano.StyleClassButtonColorRed);
+        GameAHelpButton?.StyleClasses.Add(StyleClass.Negative);
+        LobbyAHelpButton?.StyleClasses.Add(StyleClass.Negative);
         _hasUnreadAHelp = true;
     }
 
     private void UnreadAHelpRead()
     {
-        GameAHelpButton?.StyleClasses.Remove(MenuButton.StyleClassRedTopButton);
-        LobbyAHelpButton?.StyleClasses.Remove(StyleNano.StyleClassButtonColorRed);
+        GameAHelpButton?.StyleClasses.Remove(StyleClass.Negative);
+        LobbyAHelpButton?.StyleClasses.Remove(StyleClass.Negative);
         _hasUnreadAHelp = false;
     }
 
index 50a6862b8f12b2ac4e0f530687f419f3a51557cf..bc50826cfd3efc45caeac70e1fb5ea54048bf46a 100644 (file)
@@ -155,7 +155,7 @@ public sealed class CharacterUIController : UIController, IOnStateEntered<Gamepl
 
             var objectiveLabel = new RichTextLabel
             {
-                StyleClasses = { StyleNano.StyleClassTooltipActionTitle }
+                StyleClasses = { StyleClass.TooltipTitle }
             };
             objectiveLabel.SetMessage(objectiveText);
 
index e3244298596b26afe5fff8d6ecceeda643457c0c..25d3d582267b2782712de8dd5c57eed15bd162f0 100644 (file)
@@ -278,7 +278,7 @@ public sealed partial class ChatUIController : UIController
                  && style is StyleBoxFlat propStyleBoxFlat)
             color = propStyleBoxFlat.BackgroundColor;
         else
-            color = StyleNano.ChatBackgroundColor;
+            color = Color.FromHex("#25252ADD");
 
         panel.PanelOverride = new StyleBoxFlat
         {
index bf37a412e8823a545a1abaf753105f1930916abf..e96d35f825cf6378eb913bbad3679df1817f9e60 100644 (file)
@@ -6,6 +6,9 @@ namespace Content.Client.UserInterface.Systems.Chat.Controls;
 
 public sealed class ChannelSelectorItemButton : Button
 {
+    public const string StyleClassChatSelectorOptionButton = "ChatSelectorOptionButton";
+
+
     public readonly ChatSelectChannel Channel;
 
     public bool IsHidden => Parent == null;
@@ -13,7 +16,7 @@ public sealed class ChannelSelectorItemButton : Button
     public ChannelSelectorItemButton(ChatSelectChannel selector)
     {
         Channel = selector;
-        AddStyleClass(StyleNano.StyleClassChatChannelSelectorButton);
+        AddStyleClass(StyleClassChatSelectorOptionButton);
 
         Text = ChannelSelectorButton.ChannelSelectorName(selector);
 
index 0326664bd6906fc568d549ce304e59433b3d68e5..e9345d25f932ac2e3387fc96ee81bbdbf02fa264 100644 (file)
@@ -1,5 +1,4 @@
-using Content.Client.Stylesheets;
-using Content.Shared.Chat;
+using Content.Shared.Chat;
 using Content.Shared.Input;
 using Robust.Client.UserInterface.Controls;
 
@@ -8,6 +7,10 @@ namespace Content.Client.UserInterface.Systems.Chat.Controls;
 [Virtual]
 public class ChatInputBox : PanelContainer
 {
+    public const string StyleClassChatPanel = "ChatPanel";
+    public const string StyleClassChatLineEdit = "ChatLineEdit";
+    public const string StyleClassChatFilterOptionButton = "ChatFilterOptionButton";
+
     public readonly ChannelSelectorButton ChannelSelector;
     public readonly HistoryLineEdit Input;
     public readonly ChannelFilterButton FilterButton;
@@ -27,7 +30,7 @@ public class ChatInputBox : PanelContainer
         {
             Name = "ChannelSelector",
             ToggleMode = true,
-            StyleClasses = {"chatSelectorOptionButton"},
+            StyleClasses = { ChannelSelectorItemButton.StyleClassChatSelectorOptionButton },
             MinWidth = 75
         };
         Container.AddChild(ChannelSelector);
@@ -36,16 +39,16 @@ public class ChatInputBox : PanelContainer
             Name = "Input",
             PlaceHolder = GetChatboxInfoPlaceholder(),
             HorizontalExpand = true,
-            StyleClasses = {"chatLineEdit"}
+            StyleClasses = { StyleClassChatLineEdit }
         };
         Container.AddChild(Input);
         FilterButton = new ChannelFilterButton
         {
             Name = "FilterButton",
-            StyleClasses = {"chatFilterOptionButton"}
+            StyleClasses = { StyleClassChatFilterOptionButton }
         };
         Container.AddChild(FilterButton);
-        AddStyleClass(StyleNano.StyleClassChatSubPanel);
+        AddStyleClass(StyleClassChatPanel);
         ChannelSelector.OnChannelSelect += UpdateActiveChannel;
     }
 
@@ -56,12 +59,17 @@ public class ChatInputBox : PanelContainer
 
     private static string GetChatboxInfoPlaceholder()
     {
-        return (BoundKeyHelper.IsBound(ContentKeyFunctions.FocusChat), BoundKeyHelper.IsBound(ContentKeyFunctions.CycleChatChannelForward)) switch
-        {
-            (true, true) => Loc.GetString("hud-chatbox-info", ("talk-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.FocusChat)), ("cycle-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.CycleChatChannelForward))),
-            (true, false) => Loc.GetString("hud-chatbox-info-talk", ("talk-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.FocusChat))),
-            (false, true) => Loc.GetString("hud-chatbox-info-cycle", ("cycle-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.CycleChatChannelForward))),
-            (false, false) => Loc.GetString("hud-chatbox-info-unbound")
-        };
+        return (BoundKeyHelper.IsBound(ContentKeyFunctions.FocusChat),
+                BoundKeyHelper.IsBound(ContentKeyFunctions.CycleChatChannelForward)) switch
+            {
+                (true, true) => Loc.GetString("hud-chatbox-info",
+                    ("talk-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.FocusChat)),
+                    ("cycle-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.CycleChatChannelForward))),
+                (true, false) => Loc.GetString("hud-chatbox-info-talk",
+                    ("talk-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.FocusChat))),
+                (false, true) => Loc.GetString("hud-chatbox-info-cycle",
+                    ("cycle-key", BoundKeyHelper.ShortKeyName(ContentKeyFunctions.CycleChatChannelForward))),
+                (false, false) => Loc.GetString("hud-chatbox-info-unbound")
+            };
     }
 }
index db16895d599f27a2eddf83067646c5a1c0141229..7252b17bf9e3b77ca6b5fdad381faedeba0d483e 100644 (file)
@@ -27,7 +27,7 @@ public sealed partial class GhostGui : UIWidget
         GhostWarpButton.OnPressed += _ => RequestWarpsPressed?.Invoke();
         ReturnToBodyButton.OnPressed += _ => ReturnToBodyPressed?.Invoke();
         GhostRolesButton.OnPressed += _ => GhostRolesPressed?.Invoke();
-        GhostRolesButton.OnPressed += _ => GhostRolesButton.StyleClasses.Remove(StyleBase.ButtonCaution);
+        GhostRolesButton.OnPressed += _ => GhostRolesButton.StyleClasses.Remove(StyleClass.Negative);
     }
 
     public void Hide()
@@ -46,7 +46,7 @@ public sealed partial class GhostGui : UIWidget
 
             if (roles > _prevNumberRoles)
             {
-                GhostRolesButton.StyleClasses.Add(StyleBase.ButtonCaution);
+                GhostRolesButton.StyleClasses.Add(StyleClass.Negative);
             }
 
             _prevNumberRoles = (int)roles;
index dc8972970ac869156c0a35d8b968910a499db46a..8bfd1bebca0baa5132f19aa95903d6b194e1c644 100644 (file)
@@ -21,7 +21,7 @@
         ToolTip="{Loc 'game-hud-open-escape-menu-button-tooltip'}"
         MinSize="70 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonOpenRight}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonOpenRight}"
         />
     <ui:MenuButton
         Name="GuidebookButton"
@@ -31,7 +31,7 @@
         BoundKey = "{x:Static is:ContentKeyFunctions.OpenGuidebook}"
         MinSize="42 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
         />
     <ui:MenuButton
         Name="CharacterButton"
@@ -41,7 +41,7 @@
         BoundKey = "{x:Static is:ContentKeyFunctions.OpenCharacterMenu}"
         MinSize="42 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
         />
     <ui:MenuButton
         Name="EmotesButton"
@@ -51,7 +51,7 @@
         BoundKey = "{x:Static is:ContentKeyFunctions.OpenEmotesMenu}"
         MinSize="42 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
         />
     <ui:MenuButton
         Name="CraftingButton"
@@ -61,7 +61,7 @@
         ToolTip="{Loc 'game-hud-open-crafting-menu-button-tooltip'}"
         MinSize="42 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
         />
     <ui:MenuButton
         Name="ActionButton"
@@ -71,7 +71,7 @@
         ToolTip="{Loc 'game-hud-open-actions-menu-button-tooltip'}"
         MinSize="42 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
         />
     <ui:MenuButton
         Name="AdminButton"
@@ -81,7 +81,7 @@
         ToolTip="{Loc 'game-hud-open-admin-menu-button-tooltip'}"
         MinSize="42 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
         />
     <ui:MenuButton
         Name="SandboxButton"
@@ -91,7 +91,7 @@
         ToolTip="{Loc 'game-hud-open-sandbox-menu-button-tooltip'}"
         MinSize="42 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonSquare}"
         />
     <ui:MenuButton
         Name="AHelpButton"
         ToolTip="{Loc 'ui-options-function-open-a-help'}"
         MinSize="42 64"
         HorizontalExpand="True"
-        AppendStyleClass="{x:Static style:StyleBase.ButtonOpenLeft}"
+        AppendStyleClass="{x:Static style:StyleClass.ButtonOpenLeft}"
         />
 </widgets:GameTopMenuBar>
index 5bbb791123476defd8df675a51c23cbe4e18a235..107ed7e7c6aa09a887011349e79bdbc4546aa5fd 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Client.SubFloor;
+using Content.Client.Stylesheets;
 using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.CustomControls;
 using Robust.Client.UserInterface.XAML;
index 9077f95565d86c0c19896e6bdf590c104e9942c9..b850aab97643e4291fffb629d027f4e6d2f6f807 100644 (file)
@@ -1,5 +1,6 @@
 using System.Linq;
 using System.Numerics;
+using Content.Client.Stylesheets;
 using Content.Shared.VendingMachines;
 using Robust.Client.AutoGenerated;
 using Robust.Client.UserInterface.Controls;
@@ -78,7 +79,7 @@ namespace Content.Client.VendingMachines.UI
             var item = new VendingMachineItem(protoID, text);
             _listItems[protoID] = (button, item);
             button.AddChild(item);
-            button.AddStyleClass("ButtonSquare");
+            button.AddStyleClass(StyleClass.ButtonSquare);
             button.Disabled = !_enabled || _amounts[protoID] == 0;
         }
 
index caca4fd553d501faf344e245ae20ce9f065bc780..cee37a3ff80b513cf14fc522d2653f59fe3ef5c2 100644 (file)
@@ -2,7 +2,7 @@
                  xmlns:ui="clr-namespace:Content.Client.Voting.UI"
                  xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
                  MouseFilter="Stop" MinSize="350 200">
-    <PanelContainer StyleClasses="AngleRect" />
+    <PanelContainer StyleClasses="BackgroundPanel" />
     <BoxContainer Orientation="Vertical">
         <BoxContainer Margin="8 0" Orientation="Horizontal">
             <Label Text="{Loc 'ui-vote-create-title'}"
@@ -15,7 +15,7 @@
         <BoxContainer Orientation="Vertical" Margin="8 2 8 0" VerticalExpand="True" VerticalAlignment="Top">
             <BoxContainer Orientation="Vertical">
                 <OptionButton Margin="2 1" Name="VoteTypeButton" HorizontalExpand="False" />
-                <BoxContainer Name="VoteOptionsButtonContainer" HorizontalExpand="False" Orientation="Vertical"> 
+                <BoxContainer Name="VoteOptionsButtonContainer" HorizontalExpand="False" Orientation="Vertical">
                 </BoxContainer>
                 <Button Margin="64 4" Name="FollowButton" Text="{Loc 'ui-vote-follow-button'}" Visible="False" />
                 <Label Margin="2 2" Name="VoteNotTrustedLabel" Text="{Loc 'ui-vote-trusted-users-notice'}" Visible="False" />
@@ -23,7 +23,7 @@
             </BoxContainer>
             <Label Margin="8 2" Name="VoteTypeTimeoutLabel" Visible="False" />
         </BoxContainer>
-        
+
         <Button Margin="8 32 8 2" Name="CreateButton" Text="{Loc 'ui-vote-create-button'}" />
 
         <PanelContainer StyleClasses="LowDivider" />
index 7cb2b37085af07c87e51fe2fbdcb7400dbd14267..86e4a089233660c70a52eac9598a39cf21e1b23c 100644 (file)
@@ -63,7 +63,7 @@ namespace Content.Client.Voting.UI
             RobustXamlLoader.Load(this);
             _votingSystem = _entityManager.System<VotingSystem>();
 
-            Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
+            Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSystem;
             CloseButton.OnPressed += _ => Close();
             VoteNotTrustedLabel.Text = Loc.GetString("ui-vote-trusted-users-notice", ("timeReq", _cfg.GetCVar(CCVars.VotekickEligibleVoterDeathtime)));
 
index aacefd33a8afde7fc31293aca7cbc451e220c60f..a2de1eea8dc55d8f4ef55c2da884b06e0697ddb6 100644 (file)
@@ -1,10 +1,10 @@
 <Control xmlns="https://spacestation14.io" MinWidth="300" MaxWidth="500">
-    <PanelContainer StyleClasses="AngleRect" />
+    <PanelContainer StyleClasses="BackgroundPanel" />
     <BoxContainer Margin="4" Orientation="Vertical">
         <Label Name="VoteCaller" />
         <RichTextLabel Name="VoteTitle" />
         <Button Margin="4 4" Name="FollowVoteTarget" Text="{Loc 'ui-vote-follow-button-popup'}" Visible="False"></Button>
-        
+
         <GridContainer Columns="3" Name="VoteOptionsContainer"/>
         <BoxContainer Orientation="Horizontal">
             <ProgressBar Margin="4" HorizontalExpand="True" Name="TimeLeftBar" MinValue="0" MaxValue="1" />
index 2a9a6b31f898fe2b6093ba11d6894ffa0d82982a..b9ff4dd7bd0a9357c48b5235f8c6f87887835f2e 100644 (file)
@@ -27,7 +27,7 @@ namespace Content.Client.Voting.UI
             IoCManager.InjectDependencies(this);
             RobustXamlLoader.Load(this);
 
-            Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
+            Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSystem;
 
             if (_vote.TargetEntity != null && _vote.TargetEntity != 0)
             {
index 84eaa9af1b07caabd1f7cc3cfd7e8d1134402cd8..b9a5d1df9ad2112cc88efa6a4ad7a685d561c2d9 100644 (file)
@@ -137,7 +137,7 @@ public sealed partial class GunSystem
                     }),
                     (_ammoCount = new Label
                     {
-                        StyleClasses = { StyleNano.StyleClassItemStatus },
+                        StyleClasses = { StyleClass.ItemStatus },
                         HorizontalAlignment = HAlignment.Right,
                         VerticalAlignment = VAlignment.Bottom
                     }),
@@ -189,7 +189,7 @@ public sealed partial class GunSystem
                             (_noMagazineLabel = new Label
                             {
                                 Text = "No Magazine!",
-                                StyleClasses = {StyleNano.StyleClassItemStatus}
+                                StyleClasses = {StyleClass.ItemStatus}
                             })
                         }
                     },
@@ -202,7 +202,7 @@ public sealed partial class GunSystem
                         {
                             (_ammoCount = new Label
                             {
-                                StyleClasses = {StyleNano.StyleClassItemStatus},
+                                StyleClasses = {StyleClass.ItemStatus},
                                 HorizontalAlignment = HAlignment.Right,
                             }),
                             (_chamberedBullet = new TextureRect
index 01c88bcd0c6ae2c1c0744ef17030c3e599cc7d61..7aca78215fc406780b4b583fa8493da3ff71a57e 100644 (file)
@@ -159,8 +159,8 @@ namespace Content.Client.Wires.UI
                     {
                         Text = Loc.GetString("wires-menu-name-label"),
                         FontOverride = font,
-                        FontColorOverride = StyleNano.NanoGold,
                         VerticalAlignment = VAlignment.Center,
+                        StyleClasses = { StyleClass.LabelKeyText },
                     }),
                     (_serialLabel = new Label
                     {
index 9eeafd95deacafca792e6ac4d77c388c4f3f7d51..ef2f97ce3dd7a269929cf5c610afed866dc9bb8e 100644 (file)
@@ -44,7 +44,7 @@
                         MinSize="300 150">
             <BoxContainer Orientation="Vertical" Align="Begin" Margin="8">
                 <Label Text="{Loc 'replay-info-title'}" Margin="4" HorizontalAlignment="Center"/>
-                <controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="4"/>
+                <controls:HLine StyleClasses="highlight" Thickness="4"/>
                 <RichTextLabel Access="Public" Name="Info"/>
             </BoxContainer>
         </PanelContainer>
index 25ae32ab978ab2ac2ffccfd1c5e15a661118f696..d30a906d1c0a534bd480d0d9b77a87a2d2ce4b7d 100644 (file)
@@ -10,6 +10,7 @@ apc-menu-charge-label = {$percent} Charged
 apc-menu-power-state-good = Good
 apc-menu-power-state-low = Low
 apc-menu-power-state-none = None
+apc-menu-power-state-label-text = { POWERWATTS($power) }
 
 # For the flavor text on the footer
 
diff --git a/Resources/Textures/Interface/Nano/Radial/back_hover.png b/Resources/Textures/Interface/Nano/Radial/back_hover.png
new file mode 100644 (file)
index 0000000..7378a60
Binary files /dev/null and b/Resources/Textures/Interface/Nano/Radial/back_hover.png differ
diff --git a/Resources/Textures/Interface/Nano/Radial/back_normal.png b/Resources/Textures/Interface/Nano/Radial/back_normal.png
new file mode 100644 (file)
index 0000000..2c4a200
Binary files /dev/null and b/Resources/Textures/Interface/Nano/Radial/back_normal.png differ
diff --git a/Resources/Textures/Interface/Nano/Radial/button_hover.png b/Resources/Textures/Interface/Nano/Radial/button_hover.png
new file mode 100644 (file)
index 0000000..49885a2
Binary files /dev/null and b/Resources/Textures/Interface/Nano/Radial/button_hover.png differ
diff --git a/Resources/Textures/Interface/Nano/Radial/button_normal.png b/Resources/Textures/Interface/Nano/Radial/button_normal.png
new file mode 100644 (file)
index 0000000..66dc277
Binary files /dev/null and b/Resources/Textures/Interface/Nano/Radial/button_normal.png differ
diff --git a/Resources/Textures/Interface/Nano/Radial/close_hover.png b/Resources/Textures/Interface/Nano/Radial/close_hover.png
new file mode 100644 (file)
index 0000000..873d209
Binary files /dev/null and b/Resources/Textures/Interface/Nano/Radial/close_hover.png differ
diff --git a/Resources/Textures/Interface/Nano/Radial/close_normal.png b/Resources/Textures/Interface/Nano/Radial/close_normal.png
new file mode 100644 (file)
index 0000000..99417f2
Binary files /dev/null and b/Resources/Textures/Interface/Nano/Radial/close_normal.png differ
diff --git a/Resources/Textures/Interface/Nano/square.png b/Resources/Textures/Interface/Nano/square.png
deleted file mode 100644 (file)
index 468260b..0000000
Binary files a/Resources/Textures/Interface/Nano/square.png and /dev/null differ
diff --git a/Resources/Textures/Interface/Nano/square.svg b/Resources/Textures/Interface/Nano/square.svg
deleted file mode 100644 (file)
index 55ba051..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="24"
-   height="24"
-   viewBox="0 0 6.3499998 6.35"
-   version="1.1"
-   id="svg1055"
-   inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
-   sodipodi:docname="square.svg"
-   inkscape:export-filename="H:\Code\GitHub\space-station-14\Resources\Nano\square.png"
-   inkscape:export-xdpi="96"
-   inkscape:export-ydpi="96">
-  <defs
-     id="defs1049" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="22.627417"
-     inkscape:cx="10.246658"
-     inkscape:cy="8.604338"
-     inkscape:document-units="mm"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:pagecheckerboard="true"
-     inkscape:window-width="1280"
-     inkscape:window-height="971"
-     inkscape:window-x="1432"
-     inkscape:window-y="-8"
-     inkscape:window-maximized="1"
-     units="px"
-     inkscape:snap-page="true" />
-  <metadata
-     id="metadata1052">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(-79.848503,-133.93878)">
-    <rect
-       style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.62899995;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
-       id="rect816"
-       width="6.3499999"
-       height="6.3499999"
-       x="79.848503"
-       y="133.93878" />
-  </g>
-</svg>