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

List:       kde-panel-devel
Subject:    Re: Applet resizing (Python)
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2010-06-28 16:28:12
Message-ID: 201006280928.12787.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On June 28, 2010, Thomas Olsen wrote:
>   def collapse_or_expand(self):
>     if not self.collapsed:
>       # snippet for brevity - hiding controls
>       self.collapsed = True
>       self.collapse_button.nativeWidget().setIcon(KIcon("arrow-down"))
>       print "Resizing to: %i" % self.collapsed_height
>       self.applet.resize(self.applet.geometry().width(),
> self.collapsed_height) else:
>       # snippet for brevity - showing controls
>       self.collapsed = False
>       self.collapse_button.nativeWidget().setIcon(KIcon("arrow-up"))
>       self.applet.resize(self.applet.geometry().width(), self.full_height)
>     self.cfg.writeEntry("collapsed", self.collapsed)
>     self.layout_widgets()
> 
> When collapsing resize() is called with the correct values but straight
> after that new_geometry get's triggered again with a height value of ~60
> pixels more...

first, when an applet changes its own size (which is generally frowned upon, 
thought not always avoidable) it needs to emit the appletTransformedItself() 
signal.

beyond that, it could be an issue with the default sizes of the elements in 
your layout, so when the layout is recalculated they say they are larger 
again? dunno..

-- 
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 Qt Development Frameworks

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

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


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

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