Bug 381794 - System tray icon size on high DPI screen is small
Summary: System tray icon size on high DPI screen is small
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: 5.10.2
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 408929 410609 426978 429061 437243 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-29 10:17 UTC by Guo Yunhe
Modified: 2021-07-28 15:40 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.85


Attachments
Full screenshot on 2560x1600 screen (x2 scale) (300.20 KB, image/png)
2017-06-30 08:18 UTC, Guo Yunhe
Details
Screenshot displaying unusably small system tray icons on HiDPI screen (452.51 KB, image/png)
2019-06-19 10:29 UTC, Störm Poorun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2017-06-29 10:17:41 UTC
System tray widget of Plasma shell provides maximum 32px icons. On high DPI devices(x2), this size is too small. It is better to have 48px or scale-able icons to fit higher DPI.

Device: Macbook Pro 13 inch
Screen size: 13 inch
Screen resolution: 2560x1600
Display scale: x2
Comment 1 Marco Martin 2017-06-30 08:13:20 UTC
can you provide a screenshot?
Comment 2 Guo Yunhe 2017-06-30 08:18:56 UTC
Created attachment 106381 [details]
Full screenshot on 2560x1600 screen (x2 scale)
Comment 3 Nate Graham 2018-03-11 15:50:32 UTC
Looks fine to me. Is the issue that the whole panel didn't scale up to respect your HiDPI settings the way you expect it to? If so, that's Bug 356446.
Comment 4 Guo Yunhe 2018-03-11 16:43:21 UTC
(In reply to Nate Graham from comment #3)
> Looks fine to me. Is the issue that the whole panel didn't scale up to
> respect your HiDPI settings the way you expect it to? If so, that's Bug
> 356446.

No. Only system tray icons. It is because the default Plasma desktop theme only provide icons of 16px(incomplete), 22px and 32px (incomplete). When you increase the height of a panel, it is maximum 22px high in normal display and 32px in a HiDPI (2x) display, which is the same size as 16px in a normal screen.
Comment 5 Nate Graham 2018-03-11 20:11:45 UTC

*** This bug has been marked as a duplicate of bug 360333 ***
Comment 6 Störm Poorun 2019-06-19 10:28:32 UTC
ISSUE REMAINS

This issue remains/occurs on a HiDPI screen, the system tray icons are way too small. See attached screenshot. This is a serious and significant usability issue, as can be seen from related bugs there's no reasonable way for a HiDPI user to escape having an unusable system tray.

NOT A DUPLICATE

This issue is NOT a duplicate of Bug 360333 as tagged - that deals with scaling icon size when the panel is resized.This bug deals with something very different - ensuring the icon size matches the resolution.

RELATED BUGS MAKING SYSTEM TRAY UNUSABLE FOR HIDPI

Also, there is no user configurable option to change the size. Bug 363562

Nor does the size change when the panel is resized. Bug 360333

Nor can the number of rows (or columns if vertical) be set. Bug 35587


(System: Manjaro KDE Plasma 5.16, Frameworks 5.59, QT 5.12.3, Kernel 5.0.10 Resolution:  3240 x 2160)
Comment 7 Störm Poorun 2019-06-19 10:29:19 UTC
Created attachment 120994 [details]
Screenshot displaying unusably small system tray icons on HiDPI screen
Comment 8 Störm Poorun 2019-06-19 10:31:46 UTC
(In reply to Störm Poorun from comment #6)

> Nor can the number of rows (or columns if vertical) be set. Bug 35587

Correction:
Nor can the number of rows (or columns if vertical) be set. *Bug 355587*
Comment 9 Nate Graham 2019-06-23 16:52:23 UTC

*** This bug has been marked as a duplicate of bug 356446 ***
Comment 10 Nate Graham 2021-07-26 18:22:35 UTC
Un-duping since this should be possible to fix without fixing Bug 356446, and I am investigating doing so.
Comment 11 Nate Graham 2021-07-26 18:23:35 UTC
*** Bug 410609 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2021-07-26 18:23:57 UTC
*** Bug 408929 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2021-07-26 18:33:55 UTC
*** Bug 429061 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2021-07-26 18:34:29 UTC
*** Bug 437243 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2021-07-26 18:35:49 UTC
*** Bug 426978 has been marked as a duplicate of this bug. ***
Comment 16 Bug Janitor Service 2021-07-26 20:57:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/301
Comment 17 Nate Graham 2021-07-28 15:40:24 UTC
Git commit 4edb830f53aac4833ece024df59441029b01fde6 by Nate Graham.
Committed on 28/07/2021 at 15:40.
Pushed by ngraham into branch 'master'.

Fix Units::roundToIconSize() returning incorrect sizes with non-Qt scaling

When not using Qt Scaling (testable by using the Wayland session or
setting `PLASMA_USE_QT_SCALING=1` on X11), all pixel sizes are unscaled.
E.g. a 22x22 SmallMedium icon must be expressed as 44x44 to Plasma,
because it is not aware of Qt's scaling.

The `Units::roundToIconSize()` function was failing to do this, thus
returning incorrectly small icon sizes. For example you would ask it
for the correct icon for a 44px physical area, expecting a SmallMedium
icon--but internally the function would would find that 44 is lower than
48 (unscaled Large size), and give you the next smallest size, which
is Medium. Unscaled Medium is 32px, which is equivalent to a 16px scaled
icon. So you would get a Small icon when you expected a SmallMedium one.

Due to quirks of how the icon sizes increase at the larger end, correct
results were accidentally returned for larger icon sizes. However small
and smallMedium icons were always incorrectly getting the next smallest
size instead, most commonly manifesting as ToolButtons and System Tray
icons being too small.

This commit fixes the problem by scaling all of the icon sizes
internally both for the purposes of comparison and returning a final
value--but only when not using Qt scaling.
Related: bug 390147
FIXED-IN: 5.85

M  +41   -27   src/declarativeimports/core/units.cpp
M  +8    -0    src/declarativeimports/core/units.h

https://invent.kde.org/frameworks/plasma-framework/commit/4edb830f53aac4833ece024df59441029b01fde6