-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GuidedValueSlider: Rework to fix margin issues and other things #12183
Conversation
@DieBorr Can you review this as well as run it to make sure it works correctly on you system as well? |
42aa5e2
to
eb3ebbc
Compare
This might just be me but it would be kinda nice to be able to quickly see Max/Min values which were easier to tell on the older slider since you could see how far up the slider you were. |
Hi @DonLakeFlyer, I’ve checked your rework, and while the logic of the object is still a bit complicated, it’s definitely easier to read now. However, I did notice an issue that was the main reason why I initially made the slider width bigger. Here’s a screenshot: As you can see, on a monitor that’s not very big (26/27"), there’s some visible overlap. Also, the white rectangle of the vertical flickable feels a bit too close to the tick numbers. Since this widget is pretty important, I think adding a bit more width wouldn’t be a big problem. You can take my fix where I just take the rectangle near to the slider but not inside. From my point of view, the workaround in #12165 about dynamically changing the slider width feels less user-friendly, I mean, the workaround itself is nice, but I found it too noticeable. Here’s a video to show what I mean: simplescreenrecorder-2024-12-09_23.48.49.mp4I find this width change too rough because it moves the widgets next to it in a aggressive way, with ft as metric system I find it smother, this should be a minor fix and is just a different point of view I think that @HTRamsey can give his opinion. This are just little tweaks around the slider, spending time coding the base of the slider and not being able to leave it as refined as possible would be a shame. |
Hmm, strange. I tested out to "-100" and don't see the overlap. Not sure why I see different things. Let me look again.
Agree, I'll take a look at that as well. |
@DieBorr I'm hoping my last change will fix the spacing between tick marks and values. Can you try it again? |
Yes! Will try in this day as soon as I can |
Congrats @DonLakeFlyer, it's a very clever solution. I have tested it with different UI scale values and also different font scale factors of the OS (ubuntu 22.04), and now it works perfectly fine. Thanks for the time you spent on it. I'm planning to add a new feature to the slider. It consists of having a popup appear if the user holds the text value label for a specific time, allowing the user to select a specific value. Do you think this makes sense, or would it not be useful? |
Quite a twisted bit of spacing/margin logic to get right. Kind of makes my head hurt to think about it.
Yeah, I think that would be super nice. |
Replacement for #12165
While looking at #12165 I discovered other issues and also wanted to rework it so that the code was clearer. So this pull is based on that pull with some additional changes.
Changes: