Spacing in a plasma applet

Marco Martin notmart at gmail.com
Fri Apr 30 10:20:54 CEST 2010


On Friday 30 April 2010, Aaron J. Seigo wrote:
> 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.

to work as expected icons should be (Fixed, Expanding) in horizontal panels
and (Expanding, FixedI in vertical ones

Cheers
Marco Martin


More information about the Plasma-devel mailing list