Alternative desktop applet interaction
Eike Hein
hein at kde.org
Fri Feb 13 02:31:21 UTC 2015
Hi,
yesterday I added a new "Experimental" page to the config dialog
of the Folder View desktop containment in master. It offers two
options that enable a different way of interacting with widgets
on the desktop:
- Pressing and holding for $platform_delay to engage a 'move' mode
where as long as the press is kept, the applet moves with the
pointer.
- Optionally, reveal the handle on press-and-hold as well. This
is of course technically necessary (without the handle you can't
resize or rotate), but I intentionally made it a separate option
because the current handle design is not the only possibility
once you go modal like this, and this allows getting a feel for
how things are without the handle bar we're used to.
I encourage you to enable this mode (both with and without the
optional handle reveal) and play with it for a day or so.
My original assumption was that press-and-hold would be unintuitive
and cumbersome (although platforms like Android use it as well), but
in practice I find it makes the desktop feel simpler and less hyper-
active. A separate concern is that "you need to hold" interaction
patterns are usually an accessibility concern - but this is the case
for drag-by-handle, too, and a modal design would make it easier to
add keyboard controls to move applets or other a11n approaches.
Additionally, the implementation currently intentionally ignores
whether widgets are locked or not. With no handles flying in on
hover, and move/edit mode being hard to enable accidentally, the
lock itself becomes much less necessary - maybe altogether super-
fluous even, allowing for further simplification.
Some implementation notes:
* Engaging move/edit mode by press-and-hold asks everything in the
applet to abort mouse interaction and ungrab. This can be caught
in applet code via the onCanceled handlers in MouseArea and
(also new as of yesterday, added by me) and MouseEventListener -
most applet code actually needs no changes, but e.g. Folder View
itself (when used as widget) needs to do things like potentially
cancel rubber band selection mode, similar as if a release event
were to happen.
* A press-and-hold will only engage move/edit mode if the cursor
stays within the drag distance. That means if you press-and-hold
and move around more than a few px - say to do rubber band
selection or use a pen tool - that won't be interfered with. This
coarse check seems to work well in practice; even taking a long
time to select individual letters in note widgets is no problem
here.
Known issues:
* The placeholder (common to Desktop and FV) sizing with handle
reveal disabled is wrong by the handle width.
* This impl is a prototype, don't expect polish.
I'm not really sure what all of this means yet (although Netrunner
intends to ship some form of this eventually), but it's food for
thought.
Cheers,
Eike
More information about the Plasma-devel
mailing list