System tray icon sizes

Marco Martin notmart at gmail.com
Mon Sep 15 07:56:25 UTC 2014


On Friday 12 September 2014, Kai Uwe Broulik wrote:
> Hi,
> 
> One of the problems is that most of the tray icons use a Plasma IconItem
> which follows the icon sizes (16, 22, 32, 48, ...) whereas a custom item
> does not.
> 
> This is also the reason why battery and network usually appear in a
> different size since they're using SvgItem which doesn't have this magic.
> 
> Imho that needs fixing in systray.

I'm not sure that can be fixed in the systray, because it's still important 
for the clickable area to reach the screen edge(fitts law and all that jazz), 
so the actual item size should still touch the containment edges.

and is the same thing for applets just in the panel, you would have the same 
problem, so in order to retain flexibility custom compactrepresentation items 
should still compute their size...

What about a function
units.roundToIconSize(size)  ?

would still be manual, but very quick to do

MouseArea {
//the rootitem that goes to the edget

	Item {
		//whatever is graphics goes here
		width: units.roundToIconSize(parent.width)
		height: width
		anchors.centerIn: parent
  	}

}

-- 
Marco Martin


More information about the Plasma-devel mailing list