Spacing in a plasma applet
Aaron J. Seigo
aseigo at kde.org
Fri Apr 30 01:04:45 CEST 2010
On April 29, 2010, Alessandro Diaferia wrote:
thanks for fwd'ing it on, Alessandro ...
> 2010/4/30 Jesús Fernández <jesusfs at gmail.com>
>
> > Hi, I'm developing an applet (plasmoid) using the python bindings.
> > I use a QGraphicsLinearLayout and I add IconWidgets to it.
> > As I'd like the applet to live either in a horizontal or vertical panel,
> > I'm checking the orientation of the parent containment to set the
> > orientation
> > of the applet's layout.
> > I'd like the IconWidgets to have zero (or the minimum) spacing between
> > them,
> > so I call setSpacing(0) on the layout.
> > This works fine when the applet is in the desktop, ie not in a panel
> > or in the plasmoidviewer, but when the applet is in a panel,
> > there's some spacing between them and I can't figure out how to remove
> > it. Can someone please give me a hint?
probably it's spacing the icons out because the size policy and/or size hint
for the plasmoid is set to "expanding". if you set the size policies to not be
expanding, then when it is put into the panel it will not take up more space,
resulting in gaps between the icons.
--
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
More information about the Plasma-devel
mailing list