Skip to content

Improve media controller mouse wheel support

Kai Uwe Broulik requested to merge work/kbroulik/mediacontroller-wheel into master
  • Set stepSize on seek slider to make wheel work

MPRIS operates in microseconds, so the default step size of 1 makes no discernible difference in seeking the played track.

Set it to 5 seconds so that wheel works as expected. It also has the nice side-effect of making the built-in left/right key handling work.

Unfortunately, it might cause tick marks to appear for short tracks.

  • Briefly flash tooltip when seek position is changed by the user

When using the keyboard or mouse wheel to seek, briefly flash the tooltip at the current playback position to indicate where it has seeked to.

Stick to the mouse when only when using the mouse to seek.

Reason for the change

Got annoyed that wheel didn’t work and didn’t realized PlasmaComponents Slider supports it now.

Test plan

  • Can still drag the slider with the mouse to seek
  • Mouse wheel seeks now
  • Left/right when slider has focus still works to seek
  • Tooltip is at slider handle position when seeking using wheel or keyboard independent of mouse position
  • Tooltip snaps back to mouse position as soon as it moves, or after a 1s timeout

Screenshots or screen recordings

Seeking with wheel

Screenshot_20250119_094827

Tick marks on short track :(

Screenshot_20250119_095018

Bugs fixed

BUG: 416128

Merge request reports

Loading