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
This commit is contained in:
Ciarán Walsh
2025-04-18 08:42:59 +01:00
committed by GitHub
parent f7d925d972
commit ab1bcfe391
4 changed files with 92 additions and 1 deletions

View File

@@ -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<Button>()
.Class(OutputPanel.StyleClassOutputPanelScrollDownButton)
.Prop(Button.StylePropertyStyleBox, outputPanelScrollDownButton),
// OptionButton
new StyleRule(new SelectorElement(typeof(OptionButton), null, null, null), new[]
{