Reduce the hitbox for regular icon hover.
ClosedPublic

Authored by hein on Mar 1 2017, 1:21 PM.

Details

Summary

This reduces the sub-rectangle within the delegate that reacts
to pointer hover to wrap the icon and label more tightly, which
makes doing rectangle selections - foiled by accidentally
hover-activating an icon - much easier by giving it larger
gutters between icons to start in.

Subtly, it does _not_ change two other hitboxes:

  1. Once an icon is in hover state, it can still by dragged by grabbing it on any coordinate within the visible frame, as it will only become un-hovered once the frame is exited.
  2. For drag hover (e.g within spring loading) the hitbox is unchanged - the larger hotbox makes it easier to aim with e.g. a drag pixmap attached to the cursor.

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
Lint Skipped
Unit
Unit Tests Skipped
hein created this revision.Mar 1 2017, 1:21 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 1 2017, 1:21 PM
hein added a comment.Mar 1 2017, 1:22 PM

Screenshots showing the hitbox:

Before:

After:

hein updated this revision to Diff 12011.Mar 1 2017, 1:58 PM

Fix hitbox for list view mode. It was broken in the initial patch.

Use states a la icon code.

Compared to the old hitbox in listview mode, with the new code:

  • The hitbox spans the full row height (no point leaving a gutter as before).
  • The hitbox doesn't weirdly end ~1cm early.

Note that unlike Dolphin, the hitbox isn't constrained to the
length of the label. There's no value to that for FV because
we don't do rectangle select in list view mode, and it matches
the UX of other Plasma list-like UIs like Kicker & co.

broulik accepted this revision.Mar 1 2017, 2:06 PM
broulik added a subscriber: broulik.

Awesome!

This revision is now accepted and ready to land.Mar 1 2017, 2:06 PM
This revision was automatically updated to reflect the committed changes.