[Panel-devel] [PATCH] Icon mutilation

Marco Martin notmart at gmail.com
Wed Dec 26 18:36:17 CET 2007


On Wednesday 26 December 2007, Jason Stubbs wrote:
> On Wednesday 26 December 2007 22:54:54 JST Marco Martin wrote:
> > i would also kill setAlignment() , i think it should depend only from
> > orientation and from reverselayout or not
>
> I'd agree with killing off setAlignment, but I'm not sure what you mean be
> orientation and reverselayout nor what alignment you'd give based on their
> values. Can you explain that a little further please?

if the orientation property is vertical the icon has the text under the icon 
(at the moment the only supported) if it is horizontal the text is on the 
right of the icon, and it would be nice with right to left languages to be on 
the left of the icon

the alignment property is used only in Icon::Private::iconPosition and is used 
to calculate the qrect containing the icon, and i think it would only make 
sense in the following ways:
if the orientation is vertical it should be Qt::AlignHCenter | Qt::AlignTop
if the orientation is horizontal it should be (Qt::AlignVCenter|Qt::AlignLeft)
if the orientation is horizontal and plasma was called as 
plasma --reverselayout it should be (Qt::AlignVCenter|Qt::AlignRight)

the horizontal orientation is on the works and it's beginning to work, when i 
have something decent i will post the patch, maybe that would be more 
clear :)

Cheers,
Marco Martin


More information about the Panel-devel mailing list