The tooltip state. Not that good. Proposal for improvement.

Aaron J. Seigo aseigo at kde.org
Sun May 27 15:57:42 UTC 2012


On Sunday, May 27, 2012 19:55:58 Ben Cooksley wrote:
> For System Settings, the listing has icons as well. Is this possible
> with Plasma's tooltip classes?

yes, as Marco pointed out.

but since we're looking at some re-work of the implementation anyways, it 
might make sense to give ToolTipContent the ability to have a set of items.

i see that System Settings is using a QAbstractItemModel here (or a subclass 
of that, didn't look further :) and passing in a QModelIndex. so perhaps 
ToolTipContent gets the ability to have such an index (perhaps a persistent 
index?) and that is then very easily used from QML.

this would allow us to do much prettier arrangements, including in places like 
the pager and clocks.

> At the moment, it uses QWidgets (QIcon and QLabel to be precise) with
> layouts, as the previous QPainter based code did not handle RTL
> layouting properly, and quite often had rendering errors (text running
> outside the painted background, etc)

yes, we'll move to QML for all this.

> For System Settings, the items are in a QGridView, so not sure where
> the toolTipAboutToShow, etc methods would go here (on the items
> themselves, or the view?)

i agree wit Marco's suggestion.. we'll need different mechanisms for different 
kinds of targets. and one would be written for QItemView that starts watching 
mouse events on the view when the view is hovered (and stops when it is 
unhovered)

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120527/e0007531/attachment.sig>


More information about the Plasma-devel mailing list