From ab1bcfe3918751cad0d49ec4c6a150f8e17b78b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Walsh?= Date: Fri, 18 Apr 2025 08:42:59 +0100 Subject: [PATCH] Implement client-side theming for OutputPanel scroll-down button. (#35913) * Implement client-side theming for OutputPanel scroll-down button. * Use OutputPanel constant for button class name * Remove unused string * Enable scroll button for ChatBox * Update RobustToolbox * Update to merged RT version --- Content.Client/Stylesheets/StyleNano.cs | 16 ++++ .../Systems/Chat/Widgets/ChatBox.xaml | 2 +- .../Nano/rounded_button_half_bordered.svg | 75 ++++++++++++++++++ ...rounded_button_half_bordered.svg.96dpi.png | Bin 0 -> 292 bytes 4 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 Resources/Textures/Interface/Nano/rounded_button_half_bordered.svg create mode 100644 Resources/Textures/Interface/Nano/rounded_button_half_bordered.svg.96dpi.png diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs index 55e7ec0949..40d256813e 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -344,6 +344,16 @@ namespace Content.Client.Stylesheets chatFilterButton.SetPatchMargin(StyleBox.Margin.All, 5); chatFilterButton.SetPadding(StyleBox.Margin.All, 2); + var outputPanelScrollDownButtonTex = resCache.GetTexture("/Textures/Interface/Nano/rounded_button_half_bordered.svg.96dpi.png"); + var outputPanelScrollDownButton = new StyleBoxTexture + { + Texture = outputPanelScrollDownButtonTex, + }; + outputPanelScrollDownButton.SetPatchMargin(StyleBox.Margin.All, 5); + outputPanelScrollDownButton.SetPadding(StyleBox.Margin.All, 2); + outputPanelScrollDownButton.SetPadding(StyleBox.Margin.Top, 0); + outputPanelScrollDownButton.SetPadding(StyleBox.Margin.Bottom, 0); + var smallButtonTex = resCache.GetTexture("/Textures/Interface/Nano/button_small.svg.96dpi.png"); var smallButtonBase = new StyleBoxTexture { @@ -1307,6 +1317,7 @@ namespace Content.Client.Stylesheets { new StyleProperty(Button.StylePropertyStyleBox, chatChannelButton), }), + // chat filter button new StyleRule(new SelectorElement(typeof(ContainerButton), new[] {StyleClassChatFilterOptionButton}, null, null), new[] { @@ -1329,6 +1340,11 @@ namespace Content.Client.Stylesheets new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorDisabled), }), + // output panel scroll button + Element