[Color Picker] Allow dragging color button to drag color
ClosedPublic

Authored by broulik on Feb 3 2019, 4:30 PM.

Details

Summary

One can already drag colors from the popup grid to applications but this wasn't possible with the recentmost color shown in the compact representation.

Test Plan

Picked a color, dragged the tiny circle in my panel to Kolourpaint's palette, got the color dropped there.
Dropping a color *onto* the button to add it to the history still works

Only minor issue is since the MouseArea steals the press from the button, there's no press feedback on the button, only hover.

Diff Detail

Repository
R114 Plasma Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Feb 3 2019, 4:30 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 3 2019, 4:30 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Feb 3 2019, 4:30 PM

Very nice, a lovely little productivity booster. Could containsPress be used to pass the event down to the button so we get visual feedback?

Could containsPress be used to pass the event down to the button so we get visual feedback?

Unfortunately not, those properties are read-only in QtQuick Controls. One could fake that using "checkable" perhaps.

broulik updated this revision to Diff 50820.Feb 4 2019, 9:02 AM
  • Fake pressed state

Turns out we already fake it for when an acceptable drag comes in so we can also just use that for pressed state

ngraham accepted this revision.Feb 4 2019, 1:23 PM

Works great!

This revision is now accepted and ready to land.Feb 4 2019, 1:23 PM
This revision was automatically updated to reflect the committed changes.