Tool tips - again

Aaron J. Seigo aseigo at
Tue Apr 14 01:17:05 CEST 2009

On Monday 13 April 2009, Emdek wrote:
> On Monday 13-04-2009 19:26:52 Aaron J. Seigo wrote:
> > On Sunday 12 April 2009, Emdek wrote:
> >> On Sunday 12-04-2009 18:18:01 Aaron J. Seigo wrote:
> >> >> - show titles of windows when showing multiple previews;
> >> >
> >> > will this fit nicely? look nice? could we do it with QToolTips on the
> >> > previews?
> >>
> >> I'm using it already in my applet and it looks good I think:
> >>
> >>
> >
> > and for really long titles? i suppose you just elide the text?
> No, currently I'm not, but I should (I want to move to standard tool tips
> so I'm not touching this part of code now ;-)). So if the text is tool long
> the we could use that kind of gradient like in Tasks applet and the show
> full text in tool tip for tool tip

sounds good. maybe we don't even need the tooltip? in practice just the 
starting bit (as wide as the thumbnail itself) would be enough?

> (my friend that works on STasks applet
> proposed marque animation for it). ;-)

ew.. maybe on mouse over? but certainly not as a default. i can just imagine 
the visual effect of having 3 or more dancing strings :)

> > then in ToolTipContentPrivate::onWidgetDestroyed() remove the
> > ToolTipSignaller
> > *from the d->signallers collection.
> >
> > how's that sound?
> Looks good I think. :-)

cool :)

> > heck, we could even replace the fugly tooltipAboutToShow and
> > tooltipAboutToHide nonsense with this stuff .. why didn't i think of
> > this last
> > year? *sigh*
> But there will be still old signals for backward compatibility of course?

yes, i can't really touch the current code i don't think. it would be a 
behaviour change. but we can at least mark that as deprecated and move forward 
from there.

> >> So now we need clear list of needed signals and then start to work. ;-)
> >
> > hoverEnter(const KUrl &)
> > hoverLeave(const KUrl &)
> > activated(const KUrl &)
> And what about these (mostly activation for WId, with used mouse button,
> rest of them is much less useful I think)?

ah, right, ... hm. we could have two signals:

void activate(const KUrl &); // the common, easy case
void activated(cost KUrl &, Qt::MouseButton, Qt::ModifierKey); 

> > activated(ToolTipWidget, MouseButton) <- allows to trigger action for
> > given widget using left, middle, right mouse button, but only single
> > click but are we really need double clicking here? Three possibilities
> > should be enough for start. activated(WId, MouseButton) <- the same as
> > before, but for window previews, especially for multiple previews.
> > activated(KUrl, MouseButton) <- for urls (maybe QString instead of KUrl,
> > I don't know...).
> I'm not sure if working on signals part isn't too big task for me (I need

it's not overly difficult; if you're up for it, i can help you through it e.g. 
on irc ... if not, i can try and work this part out for you.

> first to read code of tool tip manager), but I could at least start to work
> on preview part I think (setting QPixmap and glowing frame on hover). Maybe
> this should be added to tasks list on techbase (soft freeze is coming)?

yes, it should be added there ...

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 Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : 

More information about the Plasma-devel mailing list