Fix drag cursor
ClosedPublic

Authored by broulik on Jan 25 2018, 4:29 PM.

Details

Summary

The MouseArea for allowing middle click to mute overrules the cursorShape of the draggable area.
By moving the middle click area to the right of the icon, we avoid this and can change the cursor to an open hand when hovering the icon to indicate something draggable. The drag area can still be middle clicked to mute.

Test Plan
  • Verified hand cursor does not show up when it cannot be dragged (device list or only one device in application list)
  • Verified that left pressing mouse changes cursor to closed hand on drag area
  • Verified middle pressing mouse does not change cursor on drag area
  • Verified drag and drop to send applications to other audio devices still works
  • Verified that middle click on the list item still mutes/unmutes
  • Verified that middle click on the icon still mutes/unmutes
  • Verified that layout is correct with layout mirroring

There's now a little gap above and below the icon where you can no longer middle click to mute/unmute but that's negligible imho as there's nothing visually there.

Note the little dead area


Open hand cursor over the icon, it "closes" when pressed. The green area is obviously not part of this patch.

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jan 25 2018, 4:29 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 25 2018, 4:29 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jan 25 2018, 4:29 PM
broulik edited the test plan for this revision. (Show Details)
drosca accepted this revision.Jan 25 2018, 4:35 PM
This revision is now accepted and ready to land.Jan 25 2018, 4:35 PM
This revision was automatically updated to reflect the committed changes.