[Panel-devel] Analog Clock resize

Aaron J. Seigo aseigo at kde.org
Sun Oct 7 18:22:19 CEST 2007


On Sunday 07 October 2007, Thomas Georgiou wrote:
> On Sunday 07 October 2007 12:56:44 pm Anne-Marie Mahfouf wrote:
> > The fix below makes the analog clock resize correctly. Is that OK or
> > should it be taken care of elsewhere?
>
> This makes it work for the dict applet too, but it does not take into
> account the standard background.
>
> I think the problem is in the libs.
> contentSizeHint() is only called when the applet is created.  It is not
> called when you call updateGeometry().  If contentSizeHint() is not called
> when the geometry is updated, how does it get the new geometry?

well, the *theory* is that FreeLayout is supposed to call setGeometry with the 
sizeHint when the applet changes.

the code path apparently is supposed to be: Widget::updateGeometry() calls 
Layout::invalidate() calls Layout::update() calls FreeLayout::setGeometry()

so i can think of a few reasons this can be failing:

- a FreeLayout isn't being created (so nothing is updating the size of the 
applets)
- FreeLayout::setGeometry isn't being called (e.g. because 
Layout::invalidate() isn't finding the correct top level layout?)
- FreeLayout::setGeometry isn't actually calling setGeometry on any of the 
applets (e.g. because d->children is incorrect or the if() on line 86 is 
succeeding rather than failing)

i'm sure there are others... sounds like a case for a bunch of debug 
statements =/

-- 
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/20071007/5c3b2b29/attachment.pgp 


More information about the Panel-devel mailing list