Bug 431855

Summary: KCMs opened with kcmshell5 have wrong title background
Product: [Plasma] kde-cli-tools Reporter: Nicolas Fella <nicolas.fella>
Component: generalAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, karatekhd, nate
Priority: VHI Keywords: regression
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.80
Attachments: Screenshot

Description Nicolas Fella 2021-01-20 17:32:52 UTC
SUMMARY
See screenshot. The title should either have the same background as the rest of the window or the area with the different color should extend to the edge
Comment 1 Nicolas Fella 2021-01-20 17:33:06 UTC
Created attachment 135021 [details]
Screenshot
Comment 2 Nicolas Fella 2021-01-20 17:33:35 UTC
This is a regression compared to 5.20
Comment 3 Jens K 2021-01-22 10:07:18 UTC
Can confirm on Plasma 5.20.80 in Neon Unstable Edition.
Comment 4 Nate Graham 2021-01-26 00:55:04 UTC
*** Bug 432092 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2021-01-26 23:40:19 UTC
Looked into this a bit and IMO it doesn't seem like a Junior Job. :)

The problem is that KPageDialog adds its own margins here. We can't easily remove them without breaking other QWidgets-based dialogs that expect them.

What we probably need to do is make a new face type that has zero margins around the whole content item, but margins around the button box sub-component. There is also a right margin that is appearing on the right side that I hven't tracked down yet. Once we fix all of that, we'd adjust KCMshell to set specify the use of the new face type.

I'll see if I can get it done.
Comment 6 Nate Graham 2021-01-26 23:42:17 UTC
Or actually, an arg might make more sense than a new face type, since in principle you might want the "no margins" look for any existing face type.
Comment 7 Nate Graham 2021-01-27 00:00:04 UTC
Or perhaps there's an even easier way...
Comment 8 Nate Graham 2021-01-27 01:42:09 UTC
...Not actually so easy after all.

For reference, https://invent.kde.org/frameworks/kwidgetsaddons/-/merge_requests/15 was a previous attempt to fix this that got stuck due to disagreements on the size of the margins for non-touching use cases.
Comment 9 Bug Janitor Service 2021-01-27 01:53:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcmutils/-/merge_requests/36
Comment 10 Ismael Asensio 2021-02-11 18:19:10 UTC
Git commit 5a5718b22a396d392df8241ef6e98b8b6faca009 by Ismael Asensio.
Committed on 11/02/2021 at 18:17.
Pushed by iasensio into branch 'master'.

Fix wrong margins on QML-based KCMs

Previous layouting relied on the page GridLayout's spacing and
global contents margins to set components spatially. This breaks
for Qml-based KCMs, as the Qml component sets its own internal
title, spacing and margins.

Now, we remove the contents margins on Qml-based KCMs so the
can expand to the edges, but keep them on QtWidget ones,
so they remain visually unchanged.

This enforces consistency between different standalone KCMs,
systemsettings sidebar view and systemsettings icon view.

It also removes an ugly extra pixel margin on the right side
caused by the GridLayout spacing.

Co-Authored by: ngraham
FIXED-IN: 5.80

M  +5    -1    src/kcmoduleproxy.cpp
M  +3    -2    src/kcmoduleqml.cpp
M  +22   -2    src/kcmultidialog.cpp

https://invent.kde.org/frameworks/kcmutils/commit/5a5718b22a396d392df8241ef6e98b8b6faca009