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
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel