Tool tips ideas

Emdek emdeck at gmail.com
Sat Apr 4 22:00:37 CEST 2009


On Saturday 04 April 2009 20:07:18 Aaron J. Seigo wrote:
> On Saturday 04 April 2009, Emdek wrote:
>> > what are the use cases?
>>
>> For example my friend is working on STasks plasmoid (that Windows 7  
>> taskbar
>> clone) and he completely changed the layout of task tool tip, added  
>> close
>> icon, moved text to top and later he want to make title text scrollable
>> when it is too long to show it in one line (personally I don't like
>> scrolling idea...).
>
> that's not a use case, that's just what your friend did. what are they  
> trying
> to achieve? or is "be different" the whole goal? (i'm guessing it isn't)

I'm not sure what he want to achieve, I'm only know that all these experiments with tool tips in his applet were started because of lack possibility to set preview of multiple windows in one tool tip, but this is now done in trunk.
So I think that if there would be possibility to connect to these later proposed clicked signals he probably would just use standard solution (he and applet users wants to have tool tips that behaves like normal, including famous move animation ;-)).



>> In my applet there are launcher together with tasks and
>> for consistency I'm displaying previews of files (for example if there  
>> is
>> entry for image or video etc.) and it looks nice only when it is shown  
>> in
>> the same way like windows live previews (this could be maybe solved by
>> adding kind of method that adds file preview or set image as preview  
>> that
>> looks like current window preview, with frame).
>
> this could be added to the API of ToolTipContent quite easily.

This would be useful but I think that there should be only possibility to set QPixmap, not also file to preview, if someone want to preview file he could just create pixmap and then set it.
Additionally there could be added hover effect for frame (I've already made some experiments with it, but only by changing opacity level with is not enough, there should be additional frame style for this purpose I think). 



>> I'm using also middle click
>> on preview to close or left to raise it or iconify.
>
> so hiding tips needs to take hover of tip itself into account (easy to  
> do :)
> and we need some clicked(ToolTipContent) signals

Yes, this would be useful, especially if there would be QPoint with location of click event on screen.



> this is expensive and never works properly. it's just like the fake panel
> background: it's inefficient and ends up looking tacky. we have the  
> tools to
> do it properly.

In this case this is not so big problem, because I'm only updating previews when there are changes in task name etc.
I'm using XRender so with Compositing this works just good (but I cannot find way to include window decorations) and I need these thumbnails also for optional showing them instead of task icon (I think that there could be method for returning window thumbnail in KWin, with option to include decoration).
Only fall back that uses that static QPixmap method for grabbing desktop contents makes problems...



>> or we don't use KWin
>
> this just needs to be pushed into the netwm spec and standardized for  
> usage by
> others

This would be great.
Currently also Compiz tries to add them, so with upstream solution this could be much cleaner.



> nothing you've said above requires the ability to put random widgets  
> into the
> tooltips though, so i think we're good. we just need to work some  
> patches out
> for the current tip.
>
> interested in trying to get some patches put together? :)

Yes, of course I'm interested (especially because I want to use it ;-)) but there is again problem with lack of compiled trunk on my machine...






More information about the Plasma-devel mailing list