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

cwo <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/powerdevil/-/commit/97d9 |ma/powerdevil/-/commit/d37b
                   |a96bc7a9e8fb21ca4c8d8ea6723 |b0f15116425248ecdc74095585a
                   |11f463167                   |613962e7f

--- Comment #12 from cwo <[email protected]> ---
Git commit d37bb0f15116425248ecdc74095585a613962e7f by Christoph Wolk.
Committed on 21/09/2026 at 07:34.
Pushed by cwo into branch 'Plasma/6.8'.

applets/brightness: fix Slider binding issues

94a03a3c04787388026a02ff40afd2b77fc9d0f6 introduced a workaround for
devices that send intermediate updates on brightness changes that
interfere with interactively dragging the slider: it binds the value
only while the control is not pressed. But this causes two issues:
- Keyboard interaction also makes the control pressed, which stops
  the Binding and causes it to restore the pre-binding value, 0, before
  applying the change. So e.g. Arrow Left will always reset the slider
  to 0, rather than one step down, the first time each Plasma run.
- Setting the value delegate's property manually breaks the binding we
  set from outside, so further changes from elsewhere (such as global
  shortcuts) will no longer be reflected in the slider, it will stay at
  whatever value it was set to in the widget. (Except for keyboard
  brightness, which has some extra logic to constantly reestablish the
  binding)

To fix this, we make the binding between the delegate more explicit,
setting it to the current value when pressed and a binding while not.
We also change how we communicate changes to the outside; rather than
having a binding that breaks and has to be established constantly, we
keep the delegate's value property always bound and communicate user
input by passing the value as an argument to the signal that causes the
change to happen anyway. This solves both issues and reduces code
complexity as things are better encapsulated (albeit at the cost of
having a bit of imperative state handling in the Slider)


(cherry picked from commit 57f1904599655bb77de7e5089a5894d5930bbaf1)

Co-authored-by: Christoph Wolk <[email protected]>

M  +12   -13   applets/brightness/BrightnessItem.qml
M  +2    -10   applets/brightness/PopupDialog.qml

https://invent.kde.org/plasma/powerdevil/-/commit/d37bb0f15116425248ecdc74095585a613962e7f

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

Reply via email to