From 6bdb0e1cbba7c5b983267150c2cbe1d1fabbff96 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 28 Jan 2026 14:22:41 +0900 Subject: [PATCH] Fix dropdown margins and animations being weird This was attempted to be fixed by frenzibyte using some hack workaround logic, but this is the true fix. Things were never matching due to `UpdateSize` spamming `Resize` transforms every frame, causing the fade out to complete before transforms have reached a final state. --- osu.Game/Graphics/UserInterface/OsuDropdown.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osu.Game/Graphics/UserInterface/OsuDropdown.cs b/osu.Game/Graphics/UserInterface/OsuDropdown.cs index ae5501a3dd..bbc826a7a7 100644 --- a/osu.Game/Graphics/UserInterface/OsuDropdown.cs +++ b/osu.Game/Graphics/UserInterface/OsuDropdown.cs @@ -104,9 +104,17 @@ namespace osu.Game.Graphics.UserInterface } } + private Vector2? targetSize; + // todo: this uses the same styling as OsuMenu. hopefully we can just use OsuMenu in the future with some refactoring protected override void UpdateSize(Vector2 newSize) { + // TODO: should probably fix this at a framework level (this method is running every frame which can spam transforms) + if (newSize == targetSize) + return; + + targetSize = newSize; + if (Direction == Direction.Vertical) { Width = newSize.X;