[PATCH] panel placement at the center (or whatever) of the screen

Aaron J. Seigo aseigo at kde.org
Thu Apr 3 22:46:34 CEST 2008


On Thursday 03 April 2008, Marco Martin wrote:
> On Wednesday 02 April 2008, Marco Martin wrote:
> > the real problem now is that when i set the geometry of the containment
> > for the first time it doesn't seem to work (does it need a fully
> > constructed view to work?) so the left border is not set, and is set only
> > when i manually change the geometry of the panel.
> > also when i change the containment geometry in updatePanelGeometry it
> > triggers updatePanelGeometry again another time, it feels a little
> > bleach, but don't know how to do it otherwise...
>
> Cleaned up a little bit, bit more robust and works with different
> alignments. there is still the problem that the svg panel doesn't load the
> right borders the first time is starts :(

i just had a brainwave ;)

why not use the QWidget* that gets passed into paintInterface to figure out 
the geometry?

the downside here is that  in PanelContainment figuring out margins when they 
change would have to be moved to the paint event ... but still, that resolves 
the *whole* issue, doesn't it?

some other comments/suggestions:

* don't new the KConfigGroups, just use them by value

* don't bother hanging on to m_mainConfig, it's not used by anything except 
for the first set up



-- 
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: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080403/601392c0/attachment.pgp 


More information about the Panel-devel mailing list