Battery Monitor on Plasma 2

Sebastian Kügler sebas at kde.org
Sun Dec 29 13:16:25 UTC 2013


Hey,

On Saturday, December 28, 2013 17:13:24 Kai Uwe Broulik wrote:
> first of all, I really like all the polish you put into Plasma 2,
> especially  system tray and the calendar

Thanks. :)

These layout cleanups do place a couple of extra restrictions (hard and soft) 
on the widgets in the panel, so we need to do some work on them. This is what 
your email is about, so let's tackle them. :)

> I have a few questions regarding the battery monitor, however:
> - (How) Can I determin whether the panel the system tray emerged from is at 
> the top or bottom of the screen? Does plasmoid.location still exist and
> work? The idea was to have the controls always as close to the panel as
> possible (less mouse travel)

plasmoid.location should work, if it doesn't, let me know. (I haven't checked 
for the system tray, but it would be an easy fix.)

> - (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?

Right now, I don't think you can. I'll think a bit about this one, and how to 
solve it in the most elegant way.

> - How to proceed concerning the expanding and collapsing of battery
> details?  It seems a plasmoid is not supposed to change its size by itself
> in Plasma 2.

In the systray, you get a fixed size. (This size depends on DPI.) In the panel 
(outside of the systray), you can resize the widh in a horizontal panel, and 
the height in a vertical one.

> On the desktop, when the plasmoid becomes smaller than its
> minimum size, it collapses to the compact representation. However when the
> minimum size changes, it causes weird behavior, such as the content
> overlapping and as soon as you touch the sizer, it re-evaluates the minimum
> sizes and collapses again (and vice-versa).

Please file a bug, this needs more detailed debugging in the containment or 
the workspace QML package. It has nothing to do with the battery specifically.

> The system tray popup also seems
> fixed in size (is the initial size of the popup the minimum width of the
> largest plasmoid?)

No, it's a reasonable size based on font metrics.

The restriction on the widgets in the systemtray is done by design to make 
them look more uniform. That means, we need to change some widgets to 
accommodate for that. People who really want the extra flexibility can still 
put it in the panel outside the systemray, and do whatever they want there 
(given the panel constraints). Items in the panel get a size dictated, for 
both, compact and expanded representation, and are supposed to deal with this. 
For the battery it means, that we will not accommodate the "show  me two 
batteries" case in the tray, as this will greatly increase complexity there, 
and I'm not willing to deal with the amount of special cases it introduces. 
People who really want this behaviour may put the battery in the panel 
independently.

> Experience also has shown that resizing a Plasma popup
> in an X + QGraphicsView world is really glitchy and ugly.

We don't use QGV in Plasma 2. Are you confusing something (or just me)?

Cheers,
-- 
sebas

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


More information about the Plasma-devel mailing list