Bug 480410

Summary: With Qt 6.7, "Remote control requested" dialog lacks some spacing
Product: [Plasma] xdg-desktop-portal-kde Reporter: Nicolas Fella <nicolas.fella>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, dougshaw77, jgrulich, me, nate, putr4.s
Priority: NOR Keywords: qt6
Version First Reported In: git-master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=480575
Latest Commit: Version Fixed/Implemented In: 6.1.0
Sentry Crash Report:
Attachments: Screenshot

Description Nicolas Fella 2024-01-27 22:16:50 UTC
Created attachment 165293 [details]
Screenshot

STEPS TO REPRODUCE
1.  Use KDE Connect on Wayland
2. Use "Remote Input"

OBSERVED RESULT
A confirmation prompt from xdg-desktop-portal-kde

 The text inside the dialog is a bit crammed and needs spacing. See screenshot

EXPECTED RESULT
A beautiful dialog

SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 6.7
Comment 1 Doug 2024-01-28 05:29:01 UTC
This appears to be fixed on KDE Neon Testing.  Can you check if it is fixed for you as well?
Comment 2 Prajna Sariputra 2024-01-29 08:40:55 UTC
That seems like it might be a Qt 6.7 specific issue, I also have git master stuff but with Qt 6.6.1 and the dialog looks fine for me.
Comment 3 Nate Graham 2024-01-29 17:31:57 UTC
Also looks fine for me with Qt 6.6.0.
Comment 4 Nicolas Fella 2024-01-29 23:31:44 UTC
Indeed, it's a change from Qt 6.7. I'm not sure I want to call it a bug, the code is rather weird. See this minimal example:

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls as QQC2

Window {
    id: root

    width: contentsControl.implicitWidth
    height: contentsControl.implicitHeight

    QQC2.Control {
        id: contentsControl

        contentItem: ColumnLayout {
            QQC2.Label {
                Layout.fillHeight: true
                text: "Something something A"
            }
            QQC2.CheckBox {
                checked: true
                text: "Something something B"
            }
        }

        anchors.fill: parent
        anchors.margins: 8
    }
}

With 6.7 the text and the checkbox slightly overlap each other, in 6.6 they don't
Comment 5 ratijas 2024-03-28 11:19:04 UTC
Nicolas, your example is a broken layout. It sets outer (window's) size to the control's implicit size, but the control is surrounded by additional margins, so it's not actually sized to implicit size but it slightly less instead. It can't possibly size itself correctly.
Comment 6 Bug Janitor Service 2024-05-31 23:07:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4390
Comment 7 Fushan Wen 2024-06-10 15:08:08 UTC
Git commit 6673961809ae9dcaaca6dd8b3bfbb12da1c597f7 by Fushan Wen, on behalf of Nicolas Fella.
Committed on 10/06/2024 at 15:08.
Pushed by fusionfuture into branch 'master'.

Fix Systemdialog layout

Remove the outer item, it only complicates things and causes the
layouting to break
FIXED-IN: 6.1.0

M  +2    -1    components/dialogs/examples/test.qml
M  +59   -73   lookandfeel/org.kde.breeze/contents/systemdialog/SystemDialog.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/6673961809ae9dcaaca6dd8b3bfbb12da1c597f7
Comment 8 Fushan Wen 2024-06-10 16:00:07 UTC
Git commit 0f385df4bd375d7d507169d9e6beea846a5a9e2f by Fushan Wen.
Committed on 10/06/2024 at 15:08.
Pushed by fusionfuture into branch 'Plasma/6.1'.

Fix Systemdialog layout

Remove the outer item, it only complicates things and causes the
layouting to break
FIXED-IN: 6.1.0


(cherry picked from commit 6673961809ae9dcaaca6dd8b3bfbb12da1c597f7)

a3681a59 Fix Systemdialog layout

Co-authored-by: Nicolas Fella <nicolas.fella@gmx.de>

M  +2    -1    components/dialogs/examples/test.qml
M  +59   -73   lookandfeel/org.kde.breeze/contents/systemdialog/SystemDialog.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/0f385df4bd375d7d507169d9e6beea846a5a9e2f