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

Aaron J. Seigo aseigo at kde.org
Tue Apr 8 11:31:00 CEST 2008


On Monday 07 April 2008, Marco Martin wrote:
> anyways, it seems that to work it needs to be invalidated uhm, well some
> times :/ probably the layout it needs to be fully constructed/popolated?
> the only way i found to check if the right margins are already set is this
> utter utter crap:
> ((formFactor() == Horizontal && firstApplet->size().height() !=
> layout()->adjustToMargins(viewGeom).height()) ||
>         (formFactor() == Vertical && firstApplet->size().width() !=
> layout()->adjustToMargins(viewGeom).width()))

hm.. well, that actually won't really work i don't think, since we want to 
adjust the margins when the view changes geometry. so ... what you probably 
want to do is cache the last seen view geometry ... sth like this make 
believe code:

if (option.view && d->lastSeenGeometry != option.view->geometry()) {
    d->lastSeenGeometry = option.view->geometry();
    determineMargins();
}

-- 
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/20080408/672a5179/attachment.pgp 


More information about the Panel-devel mailing list