Bug 339033

Summary: System tray icons don't have uniform size
Product: [Plasma] plasmashell Reporter: Martin Yrjölä <martin.yrjola>
Component: System Tray widgetAssignee: Sebastian Kügler <sebas>
Status: RESOLVED FIXED    
Severity: normal CC: kde, martin.yrjola
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Example of anchors.fill: parent

Description Martin Yrjölä 2014-09-12 14:26:13 UTC
Most system tray icons use IconItem, which follows the icon sizes (16, 22, 32, 48, ...) . If I define a plasmoid to sit in the system tray and use "anchors.fill: parent" the plasmoid will be bigger than the IconItem-based icons.

I propose that the system tray should fix this by resizing the containment for each icon to follow these icon sizes or provide a mechanism to get the current icon size.

Reproducible: Always

Steps to Reproduce:
Resize panel and notice that plasma-nm and the battery applet don't always have the same size as the other icons.
Comment 1 Martin Yrjölä 2014-09-12 14:28:14 UTC
Created attachment 88678 [details]
Example of anchors.fill: parent

This demonstrates quite well the size discrepancy.
Comment 2 David Edmundson 2014-09-23 01:11:37 UTC
>provide a mechanism to get the current icon size.

Done in plasma-framework

commit b98fdd7753658968f33742fb00f32197041c068b
Author: Marco Martin <notmart@gmail.com>
Date:   Fri Sep 19 16:38:22 2014 +0200

    introduce roundToIconSize(int size)
    
    return a size rounded tothe nearest inferior standard icon size.
    sizes larger than iconSizes.huge, it will be returned unmodified
    Reviewed by: Kai Uwe Broulik <kde@privat.broulik.de>