[Panel-devel] Plasma::Icon highlighting issues

Aaron J. Seigo aseigo at kde.org
Thu Dec 13 17:40:33 CET 2007


On Thursday 13 December 2007, Jason Stubbs wrote:
> * Only add the hover decoration if a button is not pressed so that icons
> that share a hover and clicked image still look different
> * Don't display the clicked image when the mouse moves out of the icon's
> area so that the user can see that a release outside of the icon isn't
> considered as a click
> * Add a property "delayedRelease" that controls whether the icon will
> continue to appear as pressed after a click has finished, and a release()
> method to restore the icon to normal behaviour.
> * Fix mouseMoveEvent to not prevent a click event from happening
> * Only pass MouseMove and MouseRelease events to Widget if the initial
>   MousePressed event was passed
> * Remove redundant event->accept() and event->ignore()
> * Call update() manually rather than passing on hover events and expecting
>   QGraphicsItem to do it instead as the update() call wasn't happening

these look fine. the ButtonState -> Interaction flag changes are a bit 
gratuitous and i'm not overly fond of the new names for the flags nor the 
lack of a named state for no state / interaction.

minor style nitpick:

+    } else if (!interactions.testFlag(ButtonPressed)
+        && interactions.testFlag(MouseHovering)) {

should be:

+    } else if (!interactions.testFlag(ButtonPressed) &&
+                   interactions.testFlag(MouseHovering)) {

not the alignment of the second line and the boolean operator at the end of 
the line above rather than on the start of the new line.

> * Remove the pressed(bool) signal as kickoff is the only code using it and
> the next patch changes that

it's there for completeness. think of menus that use this button. it needs to 
stay.

> (and I think that actions being triggered 
> before a release on what is essentiall a button widget is a Bad Thing(TM))

when the button causes an action to start, yes. when it results in a popup 
such as kickoff, it isn't.

> The Kickoff changes (for both applet and simpleapplet) are:
> * Display the menu on a click (=after release) rather than on mouse down

this is incorrect.

> * Set the icon's delayedRelease property so that the icon appears to stay
>   pressed while the menu is visible

cool.

> * Return the icon to normal behaviour after the menu disappears

cool. there's a BR somewhere for this as well in the plasma component.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071213/b89f8c90/attachment.pgp 


More information about the Panel-devel mailing list