Closed nahoj closed 10 months ago
Good suggestion. This isn't the normal behaviour of the Qt QSlider. It looks simple to change:https://stackoverflow.com/questions/11132597/qslider-mouse-direct-jump
I hadn't noticed the annoyance because I haven't used the sliders much since implementing Presets, and not at all since implementing lux-metering.
The best answer is: https://stackoverflow.com/a/29639127/609575. It's not the perfect answer for vdu_controls, but it can be altered to (which is actually less code):
class ClickableSlider(QSlider): # loosely based on https://stackoverflow.com/a/29639127/609575
def mousePressEvent(self, ev): # On mouse click, set value to the value at the click position
self.setValue(QStyle.sliderValueFromPosition(self.minimum(), self.maximum(), ev.x(), self.width()))
super().mousePressEvent(ev)
Nice easy improvement. It seems to work fine and doesn't degrade dragging response.
I'll look at adding a floating tool-tip on hover. Nah, the tooltips look ugly, the codes messy, and the way qt draws them can be glitchy at times.
Nice, thank you.
Currently, if my screen brightness is set to 100, and I click on the slider around the 50 mark, brigness will switch to 90, then 80, etc.
I wonder if you've considered making the value jump directly to the clicked abscissa instead, e.g. 50. This is the behavior of the standard "Power and brightness" plasmoid, for instance.
The small increments/decrements are something that's always bugged me in ddcui. I think just clicking on the desired value is more practical, especially considering that the value change has a bit of lag and may fail when done in quick succession (https://github.com/digitaltrails/vdu_controls/issues/58), e.g. clicking 5 times to get from 100 to 50.