[kde-workspace] plasma/generic/applets/systemtray2/package/contents/ui: Systemtray: Delegate Sizing

Sebastian Kügler sebas at kde.org
Sun Nov 3 21:28:50 UTC 2013


On Saturday, November 02, 2013 17:53:55 Mark Gaiser wrote:
> That's awesome! +100 :)
> 
> However..
> Why are you using javascript for this? Since Qt 5.1 we have those
> awesome dynamic layout things that automatically grow. Use that
> instead of javascript.

Which layouts exactly are you referring to?

For the panel view I'm using a GridView for now. GridView is lacking suitable 
semantics to express what we want here, which could be described as "biased 
dynamic scaling": We want the individual items scale reliably to sizes that 
are common in the rest of the panel (this is achieved by using 
PlasmaCore.IconItem (as Marco points out). Then, we want to make it possible 
to have multi-row grids, since this allows us to keep the systray applet in 
the panel not too greedy, and saves space, with not too huge items. So this is 
very specific behaviour.

So right now, I'm using a bit of javascript (which needs refinements) to 
calculate something sensible. I'm planning to make this "hinted" by the 
rendered font pixelsize, which gives us a dpi-interpolated basesize we can use 
for sizing the grid and deciding wether we want one or more rows (or columns, 
in vertical panels).

This part of the new systemtray is very much work in progress, I'm 
experimenting with a couple of things there. I'm doing this in a 170 dpi 
display, by the way, and it does raise the necessity of this dynamic scaling.

Cheers,
-- 
sebas

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


More information about the Plasma-devel mailing list