Fix modifying Label.FontOverride not causing a layout update.

This commit is contained in:
PJB3005
2025-10-25 17:56:54 +02:00
parent 669b515ce6
commit 1657a49c1c
2 changed files with 12 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ END TEMPLATE-->
### Bugfixes
* Fix `Menu` and `NumpadDecimal` key codes on SDL3.
* Fix modifying `Label.FontOverride` not causing a layout update.
### Other

View File

@@ -27,6 +27,7 @@ namespace Robust.Client.UserInterface.Controls
private ReadOnlyMemory<char> _textMemory;
private bool _clipText;
private AlignMode _align;
private Font? _fontOverride;
public Label()
{
@@ -106,7 +107,16 @@ namespace Robust.Client.UserInterface.Controls
[ViewVariables] public VAlignMode VAlign { get; set; }
public Font? FontOverride { get; set; }
public Font? FontOverride
{
get => _fontOverride;
set
{
_fontOverride = value;
_textDimensionCacheValid = false;
InvalidateMeasure();
}
}
private Font ActualFont
{