https://bugs.kde.org/show_bug.cgi?id=370924

            Bug ID: 370924
           Summary: Brightness slider slowly "moving back" after dragging
                    the slider thumb.
           Product: plasmashell
           Version: 5.8.0
          Platform: Archlinux Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Battery Monitor
          Assignee: k...@privat.broulik.de
          Reporter: r...@robwu.nl
                CC: plasma-b...@kde.org

Steps to reproduce:
1. Open the battery monitor widget.
2. Click at the left side of the slider to set the initial position of the
slider.
3. Wait until the brightness has changed.
4. Grab the slider thumb with the mouse, and move it to the right.

Expected:
- Upon releasing the thumb, the screen should be at its brightest setting.

Actual:
- Upon releasing the thumb, the screen is at its brightest setting (so far so
good)
- AND the brightness slowly drops, while the thumb slowly moves to the left.

More info:
- When I drag the slider a couple of times back and forwards, and *click* on a
point in the slider where it is moving from, then the brightness (and slider
thumb) quickly switches to that setting (as expected). But within a split
second, the thumb (and brightness level) jumps back to their previous position.

While testing this, I was utilizing 100% of my CPU (compiling), so that might
have impacted the test results.

I am not very familiar with QML, but from inspection of
applets/batterymonitor/package/contents/ui/PopupDialog.qml, it seems that there
is a feedback loop between setting the attribute and updating the value again,
which only ends when the brightness values have converged to the same value.
When I use the mouse to drag the thumb on the slider, then I probably trigger
multiple brightnessSlider value change events, which in their turn trigger the
slide value change events again (I guess?).

        brightnessSlider.valueChanged.connect(function() {
            batterymonitor.screenBrightness = brightnessSlider.value
(...)
        BrightnessItem {
            id: brightnessSlider
(...)
            Connections {
                target: batterymonitor
                onScreenBrightnessChanged: brightnessSlider.value =
batterymonitor.screenBrightness

Code snippets from:
https://quickgit.kde.org/?p=plasma-workspace.git&a=blob&h=cd92a28ca64af518409adbad9d5fb3eeebd59a1c&hb=e7a07a154006a270149d78eeb2abd114b5ab816a&f=applets%2Fbatterymonitor%2Fpackage%2Fcontents%2Fui%2FPopupDialog.qml#l42

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to