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

Authored by broulik on Sun, Feb 3, 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.Sun, Feb 3, 4:30 PM
Restricted Application added a project: Plasma. · View Herald TranscriptSun, Feb 3, 4:30 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Sun, Feb 3, 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.Mon, Feb 4, 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.Mon, Feb 4, 1:23 PM

Works great!

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