From 047ea7c09d2cf44e7a0ceffb4e13e7aa9261ea83 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 25 Feb 2026 14:35:21 +0900 Subject: [PATCH] Fix hidden settings flow content still being interactive `AlwaysPresent` is a code smell here. Rather than doing this, let's just using masking as we usually do. Closes https://github.com/ppy/osu/issues/36748. --- osu.Game/Overlays/Settings/Sections/InputSubsection.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/Settings/Sections/InputSubsection.cs b/osu.Game/Overlays/Settings/Sections/InputSubsection.cs index f6bac30217..68a19bd7a3 100644 --- a/osu.Game/Overlays/Settings/Sections/InputSubsection.cs +++ b/osu.Game/Overlays/Settings/Sections/InputSubsection.cs @@ -35,8 +35,6 @@ namespace osu.Game.Overlays.Settings.Sections public InputSubsection(InputHandler handler) { this.handler = handler; - - FlowContent.AlwaysPresent = true; } protected override Drawable CreateHeader() => header = new ToggleableHeader(Header, IsToggleable) @@ -50,6 +48,9 @@ namespace osu.Game.Overlays.Settings.Sections handlerEnabled.BindTo(handler.Enabled); handlerEnabled.BindValueChanged(updateEnabledState, true); + + // We use masking to hide the content of these sections. + FlowContent.Masking = true; } private void updateEnabledState(ValueChangedEvent state) @@ -66,8 +67,6 @@ namespace osu.Game.Overlays.Settings.Sections { FlowContent.AutoSizeAxes = Axes.None; FlowContent.ResizeHeightTo(0, 300, Easing.OutQuint); - - FlowContent.FadeOut(200, Easing.OutQuint); } else { @@ -77,9 +76,8 @@ namespace osu.Game.Overlays.Settings.Sections FlowContent.AutoSizeDuration = state.NewValue == state.OldValue ? 0 : 300; FlowContent.AutoSizeEasing = Easing.OutQuint; FlowContent.AutoSizeAxes = Axes.Y; - ScheduleAfterChildren(() => FlowContent.AutoSizeDuration = 0); - FlowContent.FadeIn(300, Easing.OutQuint); + ScheduleAfterChildren(() => FlowContent.AutoSizeDuration = 0); } }