[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: [PATCH] panel placement at the center (or whatever) of the screen
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2008-04-06 19:25:59
Message-ID: 200804061325.59258.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 05 April 2008, Marco Martin wrote:
> On Friday 04 April 2008, Aaron J. Seigo wrote:
> > On Friday 04 April 2008, Marco Martin wrote:
> > > uhm, what widget?
> >
> > the third parameter in Applet::paintInterface (and Widget::paintWidget,
> > QGraphicsItem::paint)
>
> hhm, contentsrect? it always has a 0,0 position, i ought it was the
> containment rect

ah .. right. hm. paintInterface doesn't have the widget. paintWidget does, 
however. blah! i remember why i did that too: to avoid people from using the 
widget and doing unplasma things in their widgets.

i'll add it to the Containment::StyleOption however (a ptr to the 
Plasma::View) and then it will work.

> > > anyways, using the geometry of the view(yeah, i know, bad) retrieved in
> > > paintinterface to calc the borders, the layout margins won't get
> > > updated,
> >
> > yes, it would require some caching of values (the widgets' geometry),
> > checking them in paintInterface and if they are different recalc the
> > margins.
>
> the problem is that if i call updateborders in paintinterface, or even do a
> layout()->setMargin() with an hardcoded value it seems to have no effect on
> the layout margins, until i manually resize the panel

the layout probably just needs to be invalidated. indeed, it doesn't do that 
in the set margins call. you can call invalidate() manually. i don't know how 
fixable that will be given that the margins are set in LayoutItem and the 
invalidation is in Layout. *shrug*

-- 
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

["signature.asc" (application/pgp-signature)]

_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic