Adjust sheared range slider style to avoid overlap#34362
Adjust sheared range slider style to avoid overlap#34362EYHN wants to merge 3 commits intoppy:masterfrom
Conversation
|
I guess this means the mapping is no longer accurate due to the size of the nubs being excluded in the width calculation. Not sure about that. Maybe okay if we just consider the colour spectrum a rough visual guide. |
|
I think I can get behind this change with one consideration addressed: The two nubs should not be touching. The space between should represent the 0.1 range they are still separated by. |
| float nubOriginOffset = Nub.OriginPosition.X - Nub.DrawWidth / 2f; | ||
| float nubPosition = Nub.DrawPosition.X - nubOriginOffset; | ||
| LeftBox.Size = new Vector2( | ||
| Math.Clamp(RangePadding + nubPosition - Nub.DrawWidth / 2f + ShearedNub.CORNER_RADIUS - 0.5f, 0, Math.Max(0, DrawWidth)), 1); | ||
| RightBox.Size = new Vector2( | ||
| Math.Clamp(DrawWidth - RangePadding - nubPosition - Nub.DrawWidth / 2f + ShearedNub.CORNER_RADIUS - 0.5f, 0, |
There was a problem hiding this comment.
I'm not sure how you got to this code, but it reads very bad. For instance, the split out variables are being used in two places which are also subtracting DrawWidth/2 a second time, I don't quite follow what is going on here anymore.
This issue stems from the Currently This If both the
My proposed solution is to refactor Since the logic for handling mouse input in the lower-level This would create a This would not break the existing What are your thoughts on this ? @peppy If you agree, I can submit a pull request for this change soon. |
|
That may be workable. I'd definitely call the new variable |





Fix #34334
Just a quick try. If it doesn't fit the design goals, please feel free to close this PR.
osu.development.2025-07-24.12-01-37.mp4