1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-05-10 11:28:44 +02:00

Update elements less aggressively when changing a ui system's style

This commit is contained in:
Ell 2022-01-30 16:56:07 +01:00
parent a143aef67c
commit c880c3e011
2 changed files with 3 additions and 4 deletions

View file

@ -35,6 +35,7 @@ Improvements
- Avoid unnecessary panel updates by using an Epsilon comparison when scrolling children
- Allow setting a default text alignment for paragraphs in UiStyle
- Made custom values of Element.Style persist when a new ui style is set
- Update elements less aggressively when changing a ui system's style
Fixes
- Fixed paragraph links having incorrect hover locations when using special text alignments

View file

@ -59,10 +59,8 @@ namespace MLEM.Ui {
get => this.style;
set {
this.style = value;
foreach (var root in this.rootElements) {
root.Element.AndChildren(e => e.System = this);
root.Element.ForceUpdateArea();
}
foreach (var root in this.rootElements)
root.Element.AndChildren(e => e.Style = e.Style.OrStyle(value));
}
}
/// <summary>