System tray icon sizes

Andrew Lake jamboarder at gmail.com
Sun Sep 21 08:39:20 UTC 2014


Correction: it's a 30x30 padding rect that gets the icon sizes the same,
not a 32x32 padding rect.

Hope this helps,
Andrew

On Sun, Sep 21, 2014 at 1:17 AM, Andrew Lake wrote:

> I'm running into a little bit of the inconsistency in systray icon sizes
> as we're working to try to improve the systray icons.
>
> http://wstaw.org/m/2014/09/21/5.1_systray_scaling_bug.png
>
> The icons are still a WIP so please ignore that for the moment. All the
> icons are 16x16 sitting on a padding rect in the svg. The only way I can
> get all the icons to properly render at 16x16 is to use a 32x32 padding
> rect for the example battery icon and a 24x24 padding rect for the klipper
> icon (the first screenshot). If I put them both on a 24x24 rectangle the
> battery icon appears to get scaled up resulting in both a bigger icon, and
> the icon no longer aligned to the pixel grid resulting in bluriness (the
> second screenshot) for the battery icon but a sharp klipper icon. The other
> downside is that with such a big padding rect for the battery icon, where
> it is used elsewhere the icon is really small.
>
> The same thing happens with the network icons as the battery icons.
>
> I'm not sure how to tell how the icon will be used, so I'm not what rule
> to follow to ensure the icon sizes are rendered consistently.
>
> I was going to file a bug, but I wasn't sure so I thought I'd chime in
> here.
>
> Hope this helps,
> Andrew
>
> On Mon, Sep 15, 2014 at 12:56 AM, Marco Martin <notmart at gmail.com> wrote:
>
>> 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
>> _______________________________________________
>> Plasma-devel mailing list
>> Plasma-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/plasma-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140921/068f5fa4/attachment.html>


More information about the Plasma-devel mailing list