From 545cacbcaeef497fcb953b047921a9f413bfee27 Mon Sep 17 00:00:00 2001 From: Brandon Li <48413902+aspiringLich@users.noreply.github.com> Date: Sun, 19 Oct 2025 17:10:44 -0400 Subject: [PATCH] `StyleNano` removal: Palette system and Sheetlets (#29903) * Apply patch https://github.com/moonheart08/space-station-14/compare/1777eea9a42a8bdbc4a865327bb9ef3e10fe57de..6b32bb2b148ef9d312b5332ccea4d8688694dba5 Signed-off-by: Brandon Li * make red squiggly line go away Signed-off-by: Brandon Li * Add todo list Signed-off-by: Brandon Li * Add palette to `TextureButton` Signed-off-by: Brandon Li * Rename `PalettedButtonSheetlet` to `NTButtonSheetlet` and move useful methods to `ButtonSheetlet` Signed-off-by: Brandon Li * migrate `ContextMenu` styles Signed-off-by: Brandon Li * Update todo Signed-off-by: Brandon Li * 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 * tweak color & update todo Signed-off-by: Brandon Li * chat is this real (update chat palette) Signed-off-by: Brandon Li * Update todo Signed-off-by: Brandon Li * `SmallButton` and remove some obsolete things from `StyleNano` Signed-off-by: Brandon Li * rename `StyleClasses` to `StyleClass` so `Stylesheets.Redux.StyleClasses` syntax is dead Signed-off-by: Brandon Li * replace `ButtonColorGreen` with `Positive` Signed-off-by: Brandon Li * `Placeholder` Signed-off-by: Brandon Li * Examine popup buttons Signed-off-by: Brandon Li * move over more things & cleanup `StyleNano` more (under 1000 lines!!!!) Signed-off-by: Brandon Li * Remove some more redundant stuff Signed-off-by: Brandon Li * Undo style change for chat window Signed-off-by: Brandon Li * paper editing works now Signed-off-by: Brandon Li * `OptionButton` styles Signed-off-by: Brandon Li * `ListContainer`, move `DefaultWindow` styles (for now) & more cleanup Signed-off-by: Brandon Li * fix `ActionButton` not having highlighting Signed-off-by: Brandon Li * remove imports of `Robust.Client.UserInterface.StylesheetHelpers` & format Signed-off-by: Brandon Li * `ButtonBig` and more cleanup Signed-off-by: Brandon Li * Move items inheriting from `ISheetletConfig` into their own directory Signed-off-by: Brandon Li * Cleanup & move `Label` styles Signed-off-by: Brandon Li * Action search box styles Signed-off-by: Brandon Li * Moved, stuff is Signed-off-by: Brandon Li * rename `LabelSubtext` to `LabelSubText` & move more stuff (were almost there!!) Signed-off-by: Brandon Li * yap & move over MORE stuff (just like one thing left!!!) Signed-off-by: Brandon Li * Change status classes to appropriate existing classes Signed-off-by: Brandon Li * remove remaining references to `StyleNano` Signed-off-by: Brandon Li * Fix some hardcoding & broken code, `GetFromControl` Signed-off-by: Brandon Li * Scrollbars! Signed-off-by: Brandon Li * chores Signed-off-by: Brandon Li * clean up `StyleClass.cs` Signed-off-by: Brandon Li * `ItemListSheetlet` refactor Signed-off-by: Brandon Li * more chores! Signed-off-by: Brandon Li * Consistency w/ directory structure Signed-off-by: Brandon Li * Move `MainMenuSheetlet` Signed-off-by: Brandon Li * `ColorPalette` Signed-off-by: Brandon Li * whoopsie Signed-off-by: Brandon Li * Remove most sheet-specific sheetlets Signed-off-by: Brandon Li * fix warnings, cleanup, & fix scrollbar (this is why we fix warnings boys) Signed-off-by: Brandon Li * yap Signed-off-by: Brandon Li * MASSIVE resharper skill issue Signed-off-by: Brandon Li * actually use `ISheetletConfig` Signed-off-by: Brandon Li * have specific sheetlet be specific Signed-off-by: Brandon Li * `GetResourceOr` Signed-off-by: Brandon Li * cleanup & move / remove `IPalette`s Signed-off-by: Brandon Li * actually do specific stylesheets correctly & fix tooltips Signed-off-by: Brandon Li * cleanup & logging Signed-off-by: Brandon Li * Move `FontKind` and `FontKindExtensions` to their own files Signed-off-by: Brandon Li * rename `InterfaceStylesheet` to `SystemStylesheet` Signed-off-by: Brandon Li * change `ButtonHovered` etc to `PseudoHovered` etc Signed-off-by: Brandon Li * give the palettes fun names Signed-off-by: Brandon Li * `StyleSpace` is no more Signed-off-by: Brandon Li * It should compile now! I am now going to bed (fr) if it fails it fails Signed-off-by: Brandon Li * make squiggly red line go away Signed-off-by: Brandon Li * 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 Co-authored-by: Janet Blackquill --- .../Access/UI/AgentIDCardWindow.xaml.cs | 7 +- .../UI/GroupedAccessLevelChecklist.xaml.cs | 6 +- .../Actions/UI/ActionAlertTooltip.cs | 11 +- .../AdminRemarks/AdminMessagePopupWindow.xaml | 2 +- .../AdminMessagePopupWindow.xaml.cs | 9 +- .../Administration/UI/PermissionsEui.cs | 21 +-- .../Anomaly/Ui/AnomalyGeneratorWindow.xaml | 6 +- Content.Client/Arcade/BlockGameMenu.cs | 2 +- .../Arcade/SpaceVillainArcadeMenu.cs | 2 +- .../Atmos/Monitor/UI/AirAlarmWindow.xaml.cs | 14 +- .../UI/Widgets/ThresholdBoundControl.xaml.cs | 5 +- .../Atmos/UI/GasCanisterWindow.xaml | 6 +- .../Cryostorage/CryostorageEntryControl.xaml | 5 +- .../Bed/Cryostorage/CryostorageMenu.xaml | 6 +- .../Bql/ToolshedVisualizeWindow.xaml | 2 +- .../Bql/ToolshedVisualizeWindow.xaml.cs | 2 - Content.Client/Cargo/UI/BountyEntry.xaml | 2 +- Content.Client/Changelog/ChangelogButton.cs | 4 +- Content.Client/Changelog/ChangelogTab.xaml.cs | 4 +- Content.Client/Changelog/ChangelogWindow.xaml | 5 +- .../Changelog/ChangelogWindow.xaml.cs | 3 +- .../Chemistry/UI/ChemMasterWindow.xaml | 8 +- .../Chemistry/UI/ChemMasterWindow.xaml.cs | 34 ++-- .../Chemistry/UI/HyposprayStatusControl.cs | 2 +- .../Chemistry/UI/InjectorStatusControl.cs | 2 +- .../UI/ReagentDispenserWindow.xaml.cs | 2 +- .../Chemistry/UI/SolutionStatusControl.cs | 2 +- .../Cloning/UI/AcceptCloningWindow.cs | 2 +- .../Clothing/UI/ChameleonMenu.xaml.cs | 2 +- .../Configurable/UI/ConfigurationMenu.cs | 2 +- .../ContextMenu/UI/ContextMenuElement.xaml | 3 +- .../ContextMenu/UI/ContextMenuElement.xaml.cs | 1 - Content.Client/Crayon/CrayonSystem.cs | 2 +- Content.Client/Crayon/UI/CrayonWindow.xaml.cs | 3 +- Content.Client/Credits/CreditsWindow.xaml.cs | 6 +- .../Decals/UI/DecalPlacerWindow.xaml.cs | 5 +- .../GPS/UI/HandheldGpsStatusControl.cs | 2 +- .../Gateway/UI/GatewayWindow.xaml.cs | 2 +- Content.Client/Ghost/UI/ReturnToBodyMenu.cs | 2 +- .../UI/ChameleonControllerMenu.xaml.cs | 2 +- .../Implants/UI/ImplanterStatusControl.cs | 2 +- Content.Client/Info/RulesAndInfoWindow.cs | 2 +- Content.Client/Info/RulesPopup.xaml | 2 +- .../Inventory/StrippableBoundUserInterface.cs | 2 +- Content.Client/Kitchen/UI/MicrowaveMenu.xaml | 5 +- Content.Client/LateJoin/LateJoinGui.cs | 2 +- .../Launcher/LauncherConnectingGui.xaml | 4 +- .../Launcher/LauncherConnectingGui.xaml.cs | 2 +- .../Lobby/UI/CharacterPickerButton.xaml | 2 +- .../Lobby/UI/CharacterSetupGui.xaml | 10 +- .../Lobby/UI/HumanoidProfileEditor.xaml.cs | 6 +- .../Lobby/UI/HumanoidProfileEditorSheetlet.cs | 28 +++ .../UI/Loadouts/LoadoutGroupContainer.xaml | 2 +- Content.Client/Lobby/UI/LobbyGui.xaml | 12 +- .../Lobby/UI/ObserveWarningWindow.xaml | 2 +- .../UI/Roles/RequirementsSelector.xaml.cs | 8 +- .../MainMenu/UI/MainMenuControl.xaml.cs | 3 + .../MainMenu/UI/MainMenuSheetlet.cs | 27 +++ .../MassMedia/Ui/ArticleEditorPanel.xaml | 6 +- .../MassMedia/Ui/ArticleEditorPanel.xaml.cs | 4 +- .../MassMedia/Ui/NewsArticleCard.xaml | 4 +- .../Materials/UI/MaterialDisplay.xaml.cs | 6 +- .../CrewMonitoringWindow.xaml.cs | 9 +- ...tworkConfiguratorConfigurationMenu.xaml.cs | 4 +- .../NetworkConfiguratorDeviceList.xaml | 5 +- .../NetworkConfiguratorLinkMenu.xaml.cs | 2 +- .../Systems/NetworkConfiguratorSystem.cs | 2 +- Content.Client/Nuke/NukeMenu.xaml | 2 +- .../NukeOps/WarDeclaratorWindow.xaml | 2 +- .../NukeOps/WarDeclaratorWindow.xaml.cs | 14 +- .../Options/UI/OptionsTabControlRow.xaml | 2 +- .../Options/UI/OptionsTabControlRow.xaml.cs | 2 +- .../Options/UI/Tabs/KeyRebindTab.xaml.cs | 9 +- Content.Client/PDA/PdaSheetlet.cs | 93 ++++++++++ .../PDA/Ringer/RingtoneMenu.xaml.cs | 8 +- Content.Client/Paper/UI/PaperSheetlet.cs | 33 ++++ Content.Client/Paper/UI/PaperWindow.xaml | 8 +- Content.Client/Paper/UI/StampWidget.xaml | 13 +- Content.Client/Pinpointer/UI/NavMapControl.cs | 6 +- Content.Client/Power/APC/UI/ApcMenu.xaml | 6 +- Content.Client/Power/APC/UI/ApcMenu.xaml.cs | 14 +- .../Power/Generator/GeneratorWindow.xaml.cs | 8 +- .../Power/PowerCharge/PowerChargeWindow.xaml | 10 +- .../PowerCharge/PowerChargeWindow.xaml.cs | 20 +- .../Power/PowerMonitoringWindow.xaml | 6 +- .../PowerMonitoringWindow.xaml.Widgets.cs | 10 +- .../Radiation/UI/GeigerItemControl.cs | 2 +- .../Remotes/UI/DoorRemoteStatusControl.cs | 2 +- .../Loading/ReplayLoadingFailedControl.xaml | 4 +- .../Robotics/UI/RoboticsConsoleWindow.xaml.cs | 2 +- .../RoundEnd/RoundEndSummaryWindow.cs | 2 +- .../Salvage/UI/OfferingWindowOption.xaml.cs | 4 +- ...vageExpeditionConsoleBoundUserInterface.cs | 10 +- .../SensorMonitoringWindow.xaml.cs | 8 +- .../Shuttles/UI/IFFConsoleWindow.xaml | 4 +- .../Silicons/Borgs/BorgMenu.xaml.cs | 4 +- .../Silicons/Borgs/BorgModuleControl.xaml | 2 +- .../Silicons/Laws/Ui/LawDisplay.xaml | 2 +- .../SprayPainter/SprayPainterSystem.cs | 2 +- Content.Client/Stack/StackStatusControl.cs | 2 +- Content.Client/Strip/StrippingMenu.cs | 2 +- .../Stylesheets/BaseStylesheet.Fonts.cs | 66 +++++++ .../Stylesheets/BaseStylesheet.Resources.cs | 108 +++++++++++ .../Stylesheets/BaseStylesheet.Sheetlets.cs | 49 +++++ .../Stylesheets/BaseStylesheet.Textures.cs | 59 ++++++ Content.Client/Stylesheets/BaseStylesheet.cs | 33 ++++ .../Stylesheets/Colorspace/ColorExtensions.cs | 63 +++++++ .../Stylesheets/CommonSheetletAttribute.cs | 13 ++ .../Stylesheets/CommonStylesheet.cs | 70 +++++++ Content.Client/Stylesheets/Fonts/FontKind.cs | 57 ++++++ .../Stylesheets/Fonts/NotoFontFamilyStack.cs | 90 +++++++++ Content.Client/Stylesheets/ISheetletConfig.cs | 6 + Content.Client/Stylesheets/IStyleResources.cs | 84 +++++++++ .../Stylesheets/IStylesheetManager.cs | 36 +++- .../NTSheetlets/NanoHeadingSheetlet.cs | 36 ++++ .../Stylesheets/Palette/ColorPalette.cs | 81 ++++++++ .../Stylesheets/Palette/Palettes.cs | 30 +++ .../Stylesheets/Palette/StatusPalette.cs | 57 ++++++ .../PalettedStylesheet.Palettes.cs | 12 ++ .../Stylesheets/PalettedStylesheet.cs | 14 ++ Content.Client/Stylesheets/Sheetlet.cs | 16 ++ .../SheetletConfigs/IButtonConfig.cs | 19 ++ .../SheetletConfigs/ICheckboxConfig.cs | 10 + .../SheetletConfigs/IIconConfig.cs | 12 ++ .../SheetletConfigs/ILineEditConfig.cs | 8 + .../SheetletConfigs/INanoHeadingConfig.cs | 9 + .../SheetletConfigs/IPanelConfig.cs | 9 + .../SheetletConfigs/IPlaceholderConfig.cs | 9 + .../SheetletConfigs/IRadialMenuConfig.cs | 13 ++ .../SheetletConfigs/ISliderConfig.cs | 10 + .../SheetletConfigs/IStripebackConfig.cs | 8 + .../SheetletConfigs/ITabContainerConfig.cs | 8 + .../SheetletConfigs/ITooltipConfig.cs | 9 + .../SheetletConfigs/IWindowConfig.cs | 12 ++ .../Stylesheets/Sheetlets/ButtonSheetlet.cs | 174 ++++++++++++++++++ .../Stylesheets/Sheetlets/CheckboxSheetlet.cs | 33 ++++ .../Stylesheets/Sheetlets/DividersSheetlet.cs | 34 ++++ .../Sheetlets/FancyTreeSheetlet.cs | 36 ++++ .../Stylesheets/Sheetlets/HLineSheetlet.cs | 26 +++ .../Sheetlets/Hud/ActionSheetlet.cs | 43 +++++ .../Sheetlets/Hud/ChatGameScreenSheetlet.cs | 24 +++ .../Stylesheets/Sheetlets/Hud/ChatSheetlet.cs | 51 +++++ .../Sheetlets/Hud/ContextMenuSheetlet.cs | 88 +++++++++ .../Sheetlets/Hud/ExamineButtonSheetlet.cs | 46 +++++ .../Sheetlets/Hud/ItemStatusSheetlet.cs | 30 +++ .../Sheetlets/Hud/TooltipSheetlet.cs | 64 +++++++ .../Stylesheets/Sheetlets/ItemListSheetlet.cs | 52 ++++++ .../Stylesheets/Sheetlets/LabelSheetlet.cs | 63 +++++++ .../Stylesheets/Sheetlets/LineEditSheetlet.cs | 37 ++++ .../Sheetlets/ListContainerSheetlet.cs | 31 ++++ .../Sheetlets/MenuButtonSheetlet.cs | 80 ++++++++ .../Sheetlets/OptionButtonSheetlet.cs | 31 ++++ .../Stylesheets/Sheetlets/PanelSheetlet.cs | 57 ++++++ .../Sheetlets/PlaceholderSheetlet.cs | 34 ++++ .../Sheetlets/ProgressBarSheetlet.cs | 32 ++++ .../Sheetlets/RadialMenuSheetlet.cs | 51 +++++ .../Sheetlets/ScrollbarSheetlet.cs | 58 ++++++ .../Stylesheets/Sheetlets/SliderSheetlet.cs | 74 ++++++++ .../Sheetlets/StripebackSheetlet.cs | 29 +++ .../Sheetlets/TabContainerSheetlet.cs | 33 ++++ .../Stylesheets/Sheetlets/TextSheetlet.cs | 25 +++ .../Stylesheets/Sheetlets/WindowSheetlet.cs | 132 +++++++++++++ Content.Client/Stylesheets/StyleBase.cs | 96 +--------- Content.Client/Stylesheets/StyleClass.cs | 66 +++++++ Content.Client/Stylesheets/StyleNano.cs | 50 +++-- Content.Client/Stylesheets/StyleProperties.cs | 10 + Content.Client/Stylesheets/StyleSpace.cs | 27 +-- .../Stylesheets/StylesheetHelpers.cs | 171 +++++++++++++++++ .../Stylesheets/StylesheetManager.cs | 66 ++++++- .../NanotrasenStylesheet.Palettes.cs | 12 ++ .../Stylesheets/NanotrasenStylesheet.cs | 62 +++++++ .../Stylesheets/SystemStylesheet.Palettes.cs | 12 ++ .../Stylesheets/SystemStylesheet.cs | 56 ++++++ Content.Client/Tabletop/TabletopSystem.cs | 2 +- Content.Client/Thief/ThiefBackpackSet.xaml | 2 +- .../Tools/Components/MultipleToolComponent.cs | 2 +- .../Tools/UI/WelderStatusControl.cs | 2 +- .../UserInterface/Controls/FancyWindow.xaml | 8 +- .../Controls/FancyWindow.xaml.cs | 22 +++ .../UserInterface/Controls/HLine.cs | 41 ++--- .../UserInterface/Controls/HighDivider.cs | 2 +- .../UserInterface/Controls/ListContainer.cs | 2 + .../UserInterface/Controls/MenuButton.cs | 27 ++- .../UserInterface/Controls/NanoHeading.cs | 2 +- .../Screens/DefaultGameScreen.xaml | 2 +- .../Screens/SeparatedChatGameScreen.xaml | 4 +- .../Screens/SeparatedChatGameScreen.xaml.cs | 4 + .../Systems/Actions/Controls/ActionButton.cs | 4 +- .../Actions/Controls/ActionTooltip.xaml | 10 - .../Actions/Controls/ActionTooltip.xaml.cs | 14 -- .../Actions/Windows/ActionsWindow.xaml.cs | 2 + .../Systems/Atmos/GasTank/GasTankWindow.cs | 2 +- .../Systems/Bwoink/AHelpUIController.cs | 8 +- .../Character/CharacterUIController.cs | 2 +- .../Systems/Chat/ChatUIController.cs | 2 +- .../Controls/ChannelSelectorItemButton.cs | 5 +- .../Chat/Controls/ChatInputBox.xaml.cs | 34 ++-- .../Systems/Ghost/Widgets/GhostGui.xaml.cs | 4 +- .../MenuBar/Widgets/GameTopMenuBar.xaml | 18 +- .../Sandbox/Windows/SandboxWindow.xaml.cs | 1 + .../UI/VendingMachineMenu.xaml.cs | 3 +- Content.Client/Voting/UI/VoteCallMenu.xaml | 6 +- Content.Client/Voting/UI/VoteCallMenu.xaml.cs | 2 +- Content.Client/Voting/UI/VotePopup.xaml | 4 +- Content.Client/Voting/UI/VotePopup.xaml.cs | 2 +- .../Ranged/Systems/GunSystem.AmmoCounter.cs | 6 +- Content.Client/Wires/UI/WiresMenu.cs | 2 +- .../Menu/ReplayMainMenuControl.xaml | 2 +- Resources/Locale/en-US/ui/power-apc.ftl | 1 + .../Interface/Nano/Radial/back_hover.png | Bin 0 -> 495 bytes .../Interface/Nano/Radial/back_normal.png | Bin 0 -> 525 bytes .../Interface/Nano/Radial/button_hover.png | Bin 0 -> 211 bytes .../Interface/Nano/Radial/button_normal.png | Bin 0 -> 186 bytes .../Interface/Nano/Radial/close_hover.png | Bin 0 -> 389 bytes .../Interface/Nano/Radial/close_normal.png | Bin 0 -> 391 bytes Resources/Textures/Interface/Nano/square.png | Bin 170 -> 0 bytes Resources/Textures/Interface/Nano/square.svg | 70 ------- 217 files changed, 3623 insertions(+), 604 deletions(-) create mode 100644 Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs create mode 100644 Content.Client/MainMenu/UI/MainMenuSheetlet.cs create mode 100644 Content.Client/PDA/PdaSheetlet.cs create mode 100644 Content.Client/Paper/UI/PaperSheetlet.cs create mode 100644 Content.Client/Stylesheets/BaseStylesheet.Fonts.cs create mode 100644 Content.Client/Stylesheets/BaseStylesheet.Resources.cs create mode 100644 Content.Client/Stylesheets/BaseStylesheet.Sheetlets.cs create mode 100644 Content.Client/Stylesheets/BaseStylesheet.Textures.cs create mode 100644 Content.Client/Stylesheets/BaseStylesheet.cs create mode 100644 Content.Client/Stylesheets/Colorspace/ColorExtensions.cs create mode 100644 Content.Client/Stylesheets/CommonSheetletAttribute.cs create mode 100644 Content.Client/Stylesheets/CommonStylesheet.cs create mode 100644 Content.Client/Stylesheets/Fonts/FontKind.cs create mode 100644 Content.Client/Stylesheets/Fonts/NotoFontFamilyStack.cs create mode 100644 Content.Client/Stylesheets/ISheetletConfig.cs create mode 100644 Content.Client/Stylesheets/IStyleResources.cs create mode 100644 Content.Client/Stylesheets/NTSheetlets/NanoHeadingSheetlet.cs create mode 100644 Content.Client/Stylesheets/Palette/ColorPalette.cs create mode 100644 Content.Client/Stylesheets/Palette/Palettes.cs create mode 100644 Content.Client/Stylesheets/Palette/StatusPalette.cs create mode 100644 Content.Client/Stylesheets/PalettedStylesheet.Palettes.cs create mode 100644 Content.Client/Stylesheets/PalettedStylesheet.cs create mode 100644 Content.Client/Stylesheets/Sheetlet.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/IButtonConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/ICheckboxConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/IIconConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/ILineEditConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/INanoHeadingConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/IPanelConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/IPlaceholderConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/IRadialMenuConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/ISliderConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/IStripebackConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/ITabContainerConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/ITooltipConfig.cs create mode 100644 Content.Client/Stylesheets/SheetletConfigs/IWindowConfig.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/ButtonSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/CheckboxSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/DividersSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/FancyTreeSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/HLineSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/Hud/ActionSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/Hud/ChatGameScreenSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/Hud/ChatSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/Hud/ContextMenuSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/Hud/ExamineButtonSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/Hud/ItemStatusSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/Hud/TooltipSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/ItemListSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/LabelSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/LineEditSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/ListContainerSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/MenuButtonSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/OptionButtonSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/PanelSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/PlaceholderSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/ProgressBarSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/RadialMenuSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/ScrollbarSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/SliderSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/StripebackSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/TabContainerSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/TextSheetlet.cs create mode 100644 Content.Client/Stylesheets/Sheetlets/WindowSheetlet.cs create mode 100644 Content.Client/Stylesheets/StyleClass.cs create mode 100644 Content.Client/Stylesheets/StyleProperties.cs create mode 100644 Content.Client/Stylesheets/StylesheetHelpers.cs create mode 100644 Content.Client/Stylesheets/Stylesheets/NanotrasenStylesheet.Palettes.cs create mode 100644 Content.Client/Stylesheets/Stylesheets/NanotrasenStylesheet.cs create mode 100644 Content.Client/Stylesheets/Stylesheets/SystemStylesheet.Palettes.cs create mode 100644 Content.Client/Stylesheets/Stylesheets/SystemStylesheet.cs delete mode 100644 Content.Client/UserInterface/Systems/Actions/Controls/ActionTooltip.xaml delete mode 100644 Content.Client/UserInterface/Systems/Actions/Controls/ActionTooltip.xaml.cs create mode 100644 Resources/Textures/Interface/Nano/Radial/back_hover.png create mode 100644 Resources/Textures/Interface/Nano/Radial/back_normal.png create mode 100644 Resources/Textures/Interface/Nano/Radial/button_hover.png create mode 100644 Resources/Textures/Interface/Nano/Radial/button_normal.png create mode 100644 Resources/Textures/Interface/Nano/Radial/close_hover.png create mode 100644 Resources/Textures/Interface/Nano/Radial/close_normal.png delete mode 100644 Resources/Textures/Interface/Nano/square.png delete mode 100644 Resources/Textures/Interface/Nano/square.svg diff --git a/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs b/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs index 209c58c950..ea96b13376 100644 --- a/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs +++ b/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs @@ -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 diff --git a/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs b/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs index 7af78d9e5f..2a85530c48 100644 --- a/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs +++ b/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs @@ -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); diff --git a/Content.Client/Actions/UI/ActionAlertTooltip.cs b/Content.Client/Actions/UI/ActionAlertTooltip.cs index 664a67b406..065c16d61b 100644 --- a/Content.Client/Actions/UI/ActionAlertTooltip.cs +++ b/Content.Client/Actions/UI/ActionAlertTooltip.cs @@ -23,9 +23,10 @@ namespace Content.Client.Actions.UI public ActionAlertTooltip(FormattedMessage name, FormattedMessage? desc, string? requires = null) { + Stylesheet = IoCManager.Resolve().SheetSystem; _gameTiming = IoCManager.Resolve(); - 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)) diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml index cc5207bb3a..bfe6b31c28 100644 --- a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml +++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml @@ -7,7 +7,7 @@ - + diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs index 148cbf4e18..7870dae7b2 100644 --- a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs +++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs @@ -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().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) diff --git a/Content.Client/Administration/UI/PermissionsEui.cs b/Content.Client/Administration/UI/PermissionsEui.cs index fe1237d4c9..96b53babb5 100644 --- a/Content.Client/Administration/UI/PermissionsEui.cs +++ b/Content.Client/Administration/UI/PermissionsEui.cs @@ -27,7 +27,7 @@ namespace Content.Client.Administration.UI [Dependency] private readonly IClientAdminManager _adminManager = default!; private readonly Menu _menu; - private readonly List _subWindows = new(); + private readonly List _subWindows = new(); private Dictionary _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 = diff --git a/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml b/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml index 9784b34557..88df194ecb 100644 --- a/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml +++ b/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml @@ -14,7 +14,7 @@ VerticalExpand="True" Margin="0 0 0 0" VerticalAlignment="Center"> - - - + + OnPlayerAction?.Invoke(SharedSpaceVillainArcadeComponent.PlayerAction.NewGame); grid.AddChild(newGame); - Contents.AddChild(grid); + ContentsContainer.AddChild(grid); } private void UpdateMetadata(SharedSpaceVillainArcadeComponent.SpaceVillainArcadeMetaDataUpdateMessage message) diff --git a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs index 64680b5321..60e06e98ce 100644 --- a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs +++ b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs @@ -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? AtmosDeviceDataChanged; - public event Action? AtmosDeviceDataCopied; + public event Action? AtmosDeviceDataCopied; public event Action? AtmosAlarmThresholdChanged; public event Action? AirAlarmModeChanged; public event Action? 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, }; } - - } diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs index 38c631e630..f4b31fd95b 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs +++ b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs @@ -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); } } diff --git a/Content.Client/Atmos/UI/GasCanisterWindow.xaml b/Content.Client/Atmos/UI/GasCanisterWindow.xaml index f76e32a31d..3c7647385a 100644 --- a/Content.Client/Atmos/UI/GasCanisterWindow.xaml +++ b/Content.Client/Atmos/UI/GasCanisterWindow.xaml @@ -4,7 +4,7 @@ MinSize="480 400" Title="Canister"> -