mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Fix modifying Label.FontOverride not causing a layout update.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user