Battery Monitor on Plasma 2

Sebastian Kügler sebas at kde.org
Sun Dec 29 20:38:22 UTC 2013


On Sunday, December 29, 2013 16:35:31 Marco Martin wrote:
> > - (How) Can I determin whether the plasmoid is collapsed in systray or in
> > a
> > panel? Currently when there are eg. two batteries, the battery monitor
> > shows two icons cramped next to eath other as it doesn't know it's only
> > supposed to show one icon. Does plasmoid.formfactor still exist and work,
> > especially in the systray popup or are there other means to detect this?
> 
> 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.

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.
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Plasma-devel mailing list