1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Merge pull request #26456 from peppy/fix-missing-validation

Fix `SettingsToolboxGroup` allocating excessively due to missing cache validation
This commit is contained in:
Bartłomiej Dach 2024-01-09 14:36:14 +01:00 committed by GitHub
commit a25223597b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,9 +151,12 @@ namespace osu.Game.Overlays
base.Update();
if (!headerTextVisibilityCache.IsValid)
{
// These toolbox grouped may be contracted to only show icons.
// For now, let's hide the header to avoid text truncation weirdness in such cases.
headerText.FadeTo(headerText.DrawWidth < DrawWidth ? 1 : 0, 150, Easing.OutQuint);
headerTextVisibilityCache.Validate();
}
}
protected override bool OnInvalidate(Invalidation invalidation, InvalidationSource source)