Invalidate OutputPanel on style change

Fixes an incorrect height staying cached on font change.
This commit is contained in:
PJB3005
2025-10-26 20:37:42 +01:00
parent 37c7aa544e
commit 8ac5fc58d2
2 changed files with 9 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ END TEMPLATE-->
* Fix `Menu` and `NumpadDecimal` key codes on SDL3.
* Fix modifying `Label.FontOverride` not causing a layout update.
* Controls created by rich-text tags now get arranged to a proper size.
* Fix `OutputPanel` scrollbar breaking if a style update changes the font size.
### Other

View File

@@ -336,6 +336,14 @@ namespace Robust.Client.UserInterface.Controls
base.UIScaleChanged();
}
protected override void StylePropertiesChanged()
{
base.StylePropertiesChanged();
// Font may have changed.
_invalidateEntries();
}
internal static float GetScrollSpeed(Font font, float scale)
{
return font.GetLineHeight(scale) * 2;