Battery Monitor on Plasma 2
Sebastian Kügler
sebas at kde.org
Tue Dec 31 13:44:08 UTC 2013
On Sunday, December 29, 2013 21:59:48 Marco Martin wrote:
> On Sunday 29 December 2013, Sebastian Kügler wrote:
> > > formfactor does exist, but there aren't differences between being in
> > > apanel or in a systray...
> > > hmm, so when in a systray would make sense a "constrained" formfactor or
> > > something like that, ie not able to expand neither horizontally nor
> > > vertically
> >
> > So add a formfactor "ConstrainedSquare" ... wait, we had that in the past.
> > I've given this some though as well, and I think the cleanest solution is
> > to reintroduce it.
>
> yeah, it was a slightly different thing tough, it was an "aspectRatio"
> property, so was the plasmoid that was asking the containment to be sized
> like that.
> while if it goes in the formfactor is the other way around, is the
> containment that says to the plasmoid to not try to expand.
> (not sure about the constrainedsquare name btw, since was used for another
> type, unless is aspectratio again, but i would rather not since doesn't
> play well with layouts)
>
> > That said, I think flags might be more elegant here, so the constraints
> > could be Vertical | Horizontal, but I'm not sure how happy that'd make us
> >
> > in two aspects:
> >
> > - needs porting in plasmoid, and the case can be hard to test -> we
> > introduce subtle bugs
> > - it's easy to confuse the setter with a normal setter, overriding
> > properties (maybe not so much an issue, since it's a read-only property)
> >
> > With that in mind, I'd opt for ConstrainedSquare as new formfactor.
>
> yeah, would change the value of the enum, i fear that there could still
> remain one or two cases around where (the horror) was using directly the
> numbers.
>
> it would have probably be the best way tough if plasma was designed today
> (NoConstraint=0 for planar, vertical or horizontal for panels, the or for
> the systray)
> I don't hink it's worth to do the huge porting work tough
Agree.
So we introduce a new FormFactor "Square"? If nobody objects, I'll add it in
the coming days.
Cheers,
--
sebas
http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
More information about the Plasma-devel
mailing list