Bug 477423 - 16px system-log-out icon lacks circle present in all larger versions
Summary: 16px system-log-out icon lacks circle present in all larger versions
Status: CONFIRMED
Alias: None
Product: Breeze
Classification: Plasma
Component: Icons (other bugs)
Version First Reported In: 5.27.80
Platform: unspecified Linux
: NOR minor
Target Milestone: ---
Assignee: visual-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-23 15:35 UTC by Kal Sandbrook
Modified: 2023-12-01 17:37 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of dropdown icons, with the relevant icons highlighted (30.67 KB, image/png)
2023-11-23 15:35 UTC, Kal Sandbrook
Details
system-log-out.svg: draft of a 16px icon version (1.86 KB, image/svg+xml)
2023-12-01 08:10 UTC, Jakob Petsovits
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kal Sandbrook 2023-11-23 15:35:14 UTC
Created attachment 163397 [details]
Screenshot of dropdown icons, with the relevant icons highlighted

SUMMARY
When in the powerdevil "Energy Saving" kcm, the icon displayed for "Show logout screen" under the Power Button pressed is different between it's appearances on the dropdown button and on the list.


STEPS TO REPRODUCE
1. Open system settings
2. Go into the "Energy Saving" kcm
3. View the "When power button pressed" dropdown list


SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.80 
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Comment 1 Nate Graham 2023-11-26 19:26:26 UTC
Can reproduce.
Comment 2 Jakob Petsovits 2023-12-01 05:56:10 UTC
Great catch, thanks. The code only uses a single icon, "system-log-out-symbolic". However, Icon Explorer shows that for this icon, 22px and above introduce the surrounding circle, whereas the 16px version only uses the arrow without the circle.

The QML code passes just the icon name to the two icon-drawing components (KQuickStyleItem for the unopened ComboBox styling, and QQC2.ItemDelegate for the popup list item). It would seem that both are requesting different icon sizes by default, despite the font size being the same for the text shown next to the icon. We could try to force the smaller icon size (16px instead of 22) for popup list items, or look into whether it's possible to use the same icon sizes by default without visual regressions.
Comment 3 Jakob Petsovits 2023-12-01 08:10:28 UTC
Created attachment 163687 [details]
system-log-out.svg: draft of a 16px icon version

Alternatively, we could ask the graphics team for a 16px icon with circle. I tried my hand at one (see attachment), same circle dimension as the do-nothing icon, but the number of pixels is getting pretty low there so it's hard to get a pointy arrowhead without taking the arrow off-center. I'm also not an expert at pixel-perfect anti-aliasing alignments.

In terms of changing KQuickStyleItem, the default icon size is set by qqc2-desktop-style/plugin/kquickstyleitem.cpp and tied to KQuickStyleItem::style()->pixelMetric(QStyle::PM_ButtonIconSize, m_styleoption, nullptr), which is used in a bunch of other components as well. Not sure if changing the default is good for consistency overall. In the powerdevil UI, one can try the 22px version by adding:

            props.iconWidth = props.iconHeight = 22;

to background.properties in powerdevil/kcmodule/profiles/ui/ComboBoxWithIcon.qml - it looks okay, I guess. A little more in-your-face in terms of icon prominence. However, that hardcoded value doesn't work for the general case because it will break on higher-DPI setups.

In the popup list, the icon width could be reduced by setting icon.width and icon.height to 16 for the the QQC2.ItemDelegate in the same file. This actually reduces the overall height of the list item, making it look a little weird and harder to select. Not great overall, and also not clear where to get the real value from in general, because we don't really have insight into the KQuickStyleItem there anyway.

Overall, I'm leaning towards updating the 16px icon (however imperfect it might end up compared to the larger versions) and as an alternative, exploring a larger (22px) icon size for ComboBox and potentially related UI components.
Comment 4 Jakob Petsovits 2023-12-01 08:22:51 UTC
By the way, the "Lock screen" option has a similar icon mismatch, and will be much harder to fit into a 16x16 icon with a 12x12 (2px margin) standard circle. Maybe this is an incentive to explore 22px as default size for ComboBox (and possibly related) components.
Comment 5 Nate Graham 2023-12-01 17:37:59 UTC
I agree, updating the 16px icon is the better approach here, and will improve consistency elsewhere too.