Python Plasma.PopupApplet revisited

Thomas Olsen tanghus at gmail.com
Wed Jul 14 22:29:18 CEST 2010


On Wednesday 14 July 2010 07:39:10 Nate C wrote:
> I went through the same thing a few days ago. I found this first block
> on web somewhere.  If the form factor is not planar then you know you
> are in a panel. I did not have much luck with the popup extenders.
> But, this will allow it to at least dock sensibly to a panel.
> 
> def init
> if (self.formFactor() == Plasma.Planar):
>  self.planar = True
>  self.horizontal = False
> elif (self.formFactor() == Plasma.Horizontal):
>  self.planar = False
>  self.horizontal = True
> elif (self.formFactor() == Plasma.Vertical):
>  self.planar = False
>  self.horizontal = False
> 
> # panel icon
> if not self.planar:
>    self.icon = MbPanelIcon()
>    layout = QGraphicsLinearLayout(Qt.Vertical)
>    self.setLayout(layout)
>    layout.addItem(self.icon)
>    self.icon.updateIcon(self.geometry())
>    return

Thanks. It might not help with the popup but it will come in handy elsewhere 
:-)

Anyways - now I have filed a bug report [*] on the bindings module with a test 
case attached as it seems like no one has been able to get it to work - or 
wont share the secret ;-)

[*] https://bugs.kde.org/show_bug.cgi?id=244667  Please vote

-- 
Best Regards / Med venlig hilsen

Thomas Olsen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100714/7648c8e9/attachment.sig 


More information about the Plasma-devel mailing list