Review Request: Tooltip show the thumbnail not correctly centered

Loic Marteau loic.marteau at gmail.com
Sun Dec 14 12:01:17 CET 2008



> On 2008-12-13 16:57:49, Aaron Seigo wrote:
> > i don't think the checkSize from prepareShowing should be removed; it's ok to add it to showEvent, though. i do wonder, however: does layout()->activate() work as well in showEvent()? it *should* have the right size there, but maybe just not the right layout ... if layout()->activate() doesn't work, then yes, please add a checkSize() call to showEvent()
> 
> Loic Marteau wrote:
>     You're right, this is a layout problem, the size of the tooltip itself is ok but the layout inside should be recalculated because the preview is changed.
>     
>     Actually checkSize in showevent instead of prepareShowing is only here to trigger, at the good time, a resizeEvent who trigger itself an adjustement of the layouting (so if i let the call to checkSize in prepareShowing this is no more triggered because the tooltip has the same size).
>     
>     But perhaps this is more a bug from qt since recalculation of the layouting appears to be ok in the major number of the cases ?! (its only appear in some strange case during when the preview has to be moved a little to the left to be ok)
>     
>     layout()>activate in showEvent does not work but updateGeometry() seems to work.
>     
>     So what is the choice :
>     1) this is a lack of a correct call to updateGeometry somewhere when the window_id is setted to the preview (so updateGeometry should be called at this place and not in showEvent) ?
>     2) This is a qt bug and i should commit updateGeometry in showEvent() and then i add a fixme to remove the call when this is fixed in qt ?
>     3) This is a qt bug and i should commit the first patch to avoid the compute of the layouting too much and then i add a fixme to put the checkSize in this correct dedicated first place when this is fixed in qt  ?
>     4) There is something more trivial to do that i didn't see due to a lack of knowledge
>     
>     I vote for the 4 :p
>     
>     Cheers
>

Just see that Marco commited something to solve bug 177378 in tooltip just before i start working on :

d->preview->setInfo(); 
in the resizeEvent and it seems that this solve this problem too (i dont trigger it anymore), so i will wait a little and discard this patch


- Loic


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.vidsolbach.de/r/308/#review293
-----------------------------------------------------------


On 2008-12-13 16:07:28, Loic Marteau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.vidsolbach.de/r/308/
> -----------------------------------------------------------
> 
> (Updated 2008-12-13 16:07:28)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> Hello
> 
> I have a bug here than trigger sometimes when tootip is moved : the thumnail is not correctly re-centered if it's have to be moved a little to the left to be in a correct position (i talk about the position of the thumbnail, not the tootltip).
> 
> I have a patch for that but since i don't understand correctly why this bug trigger sometimes and not always, im not sure it is correct to solve the bug in this way.
> 
> Cheers, 
> 
> Lo
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/plasma/private/tooltip.cpp
> 
> Diff: http://reviewboard.vidsolbach.de/r/308/diff
> 
> 
> Testing
> -------
> 
> 
> Screenshots
> -----------
> 
> 
>   http://reviewboard.vidsolbach.de/r/308/s/97/
> 
> 
> Thanks,
> 
> Loic
> 
>



More information about the Plasma-devel mailing list