Bug 448365

Summary: Plasma checkboxes and labels have a different spacing than checkboxes and labels present in Plasma (currently 5px, should be 7px)
Product: [Frameworks and Libraries] libplasma Reporter: Photon <ncqm3qdz>
Component: componentsAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: minor CC: materka, me, nate, plasma-bugs-null, qydwhotmail
Priority: NOR    
Version First Reported In: 5.90.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot

Description Photon 2022-01-13 13:47:54 UTC
Created attachment 145406 [details]
Screenshot

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open the Audio Volume system tray applet or the Battery one;
2. Open any System Settings page that has a checkbox and a label.


OBSERVED RESULT


EXPECTED RESULT
In Qt apps, checkboxes and labels have 7px of spacing whereas in system tray applets they have 5px.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 35
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.13-200.fc35.x86_64 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8265U CPU @ 1.60GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620

ADDITIONAL INFORMATION
👀
Comment 1 Bug Janitor Service 2023-12-08 22:21:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze/-/merge_requests/383
Comment 2 ratijas 2023-12-08 22:22:09 UTC
Turns out, this is not consistent within Breeze QStyle either. Standalone radio buttons and check boxes have 4px spacing, while delegates seem to have 6px plus 1 or 2 px vertical offset (meaning, vertical alignment differs).

Funny enough, qqc2-desktop-style has the infrastructure in place to pass relevant metrics through, but they were kinda left out from Breeze implementation of pixelMetrics() dispatcher.
Comment 3 ratijas 2023-12-10 02:08:35 UTC
Git commit 9727008adf20ebc8e45c3cddcc9a0f7f8b0ba78c by ivan tkachenko.
Committed on 10/12/2023 at 03:06.
Pushed by ratijas into branch 'master'.

CheckBox, RadioButton: Expose label spacing pixel metrics

The default value upstream seems to be 6dip, which is not what Breeze
really uses for layouting. Interestingly, qqc2-desktop-style has the
needed infrastructure in place to query these pixel metrics from a
native style, so QtQuick apps have used the wrong value in for quite
some time now.

As a drive-by clean-up, let's collapse those for identical cases above.

M  +4    -3    kstyle/breezestyle.cpp

https://invent.kde.org/plasma/breeze/-/commit/9727008adf20ebc8e45c3cddcc9a0f7f8b0ba78c