Fix disabled form slider bars being half-baked#36080
Merged
peppy merged 5 commits intoppy:masterfrom Dec 22, 2025
Merged
Conversation
In order of severity: - You could actually click on the textbox portion of a disabled textbox, focus it, select text, input stuff, and commit, which would die on the spot. - The slider part had no visual indication that it's not interactable anymore.
peppy
previously approved these changes
Dec 19, 2025
frenzibyte
reviewed
Dec 20, 2025
Comment on lines
+210
to
+211
| textBox.ReadOnly = disabled; | ||
| updateState(); |
Member
There was a problem hiding this comment.
Placing this here doesn't handle the case where the bindable is already disabled before the slider is loaded.
Consider this diff:
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneFormControls.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneFormControls.cs
index 2003f5de83..b924e1f844 100644
--- a/osu.Game.Tests/Visual/UserInterface/TestSceneFormControls.cs
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneFormControls.cs
@@ -87,6 +87,20 @@ public TestSceneFormControls()
},
TabbableContentContainer = this,
},
+ new FormSliderBar<float>
+ {
+ Caption = "Slider",
+ Current = new BindableFloat
+ {
+ MinValue = 0,
+ MaxValue = 10,
+ Value = 5,
+ Precision = 0.1f,
+ Disabled = true,
+ },
+ TransferValueOnCommit = true,
+ TabbableContentContainer = this,
+ },
new FormEnumDropdown<CountdownType>
{
Caption = EditorSetupStrings.EnableCountdown,
CleanShot.2025-12-20.at.04.56.44.mp4
peppy
approved these changes
Dec 22, 2025
This was referenced Jan 1, 2026
This was referenced Jan 2, 2026
This was referenced Jan 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed during review of #36055.
Before:
Screen.Recording.2025-12-19.at.12.20.13.mov
After:
Screen.Recording.2025-12-19.at.12.21.10.mov
In order of severity: