<table><tr><td style="">pgkos added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7849" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p><a href="https://phabricator.kde.org/p/broulik/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@broulik</a> consider this case:</p>

<p>The tray icons' size is defined by default in <tt style="background: #ebebeb; font-size: 13px;">org.kde.plasma.private.systemtray/contents/config/main.xml</tt> to <tt style="background: #ebebeb; font-size: 13px;">smallMedium</tt>, which means 22 pixels on a 96-dpi screen. On a 192-dpi screen, the icons' real size is 44 pixels.<br />
Now, in <tt style="background: #ebebeb; font-size: 13px;">org.kde.plasma.private.systemtray/contents/ui/main.qml</tt> there is this line:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">units.roundToIconSize(Math.min(Math.min(width, height), units.iconSizes[iconSizes[plasmoid.configuration.iconSize]]))</pre></div>

<p>The <tt style="background: #ebebeb; font-size: 13px;">height</tt> property is the height of the panel (assuming the panel is horizontal). On my hidpi screen the default panel height is around 72 pixels (<tt style="background: #ebebeb; font-size: 13px;">32 px * 2</tt>).</p>

<p>So the above line evaluates to:<br />
<tt style="background: #ebebeb; font-size: 13px;">units.roundToIconSize(Math.min(72, units.iconSizes.smallMedium))</tt><br />
<tt style="background: #ebebeb; font-size: 13px;">units.roundToIconSize(Math.min(72, 44))</tt><br />
<tt style="background: #ebebeb; font-size: 13px;">units.roundToIconSize(44)</tt></p>

<p>and that gets rounded to <tt style="background: #ebebeb; font-size: 13px;">medium</tt> size, which is incorrect, because we want a <tt style="background: #ebebeb; font-size: 13px;">smallMedium</tt> size multiplied by two (<tt style="background: #ebebeb; font-size: 13px;">32 px != 22 px * 2</tt>).</p>

<p>So, on a hidpi screen the <tt style="background: #ebebeb; font-size: 13px;">roundToIconSize</tt> function returns a wrong size, and additionally it (wrongly) does not multiply the size by the icon dpi scaling factor (e.g. <tt style="background: #ebebeb; font-size: 13px;">2.0</tt>).</p></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7849" rel="noreferrer">https://phabricator.kde.org/D7849</a></div></div><br /><div><strong>To: </strong>pgkos, Plasma<br /><strong>Cc: </strong>broulik, Frameworks, davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>