[frameworks/kirigami] src/forms: forms: Explicitly specify individual paddings when setting padding

Arjen Hiemstra <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 2184a3f8c34aa6ee3f898959908dc89713fa91af by Arjen Hiemstra.
Committed on 18/08/2026 at 10:21.
Pushed by ahiemstra into branch 'master'.

forms: Explicitly specify individual paddings when setting padding

If the style sets individual paddings, setting the general padding
property does nothing. For Control, qqc2-desktop-style does exactly
that, so we need to specify individual paddings to override that.

M  +5    -1    src/forms/cards/FormEntry.qml
M  +6    -1    src/forms/flat/FormEntry.qml

https://invent.kde.org/frameworks/kirigami/-/commit/2184a3f8c34aa6ee3f898959908dc89713fa91af

diff --git a/src/forms/cards/FormEntry.qml b/src/forms/cards/FormEntry.qml
index 338e5ee85..d8c179563 100644
--- a/src/forms/cards/FormEntry.qml
+++ b/src/forms/cards/FormEntry.qml
@@ -142,7 +142,11 @@ FT.FormEntry {
             QQC.Control {
                 id: contentItemWrapper
 
-                padding: 0
+                leftPadding: 0
+                rightPadding: 0
+                topPadding: 0
+                bottomPadding: 0
+
                 spacing: parent.spacing // Ensure that `contentItem.parent.spacing` works
                 implicitWidth: contentItem.Layout.preferredWidth > 0 ? contentItem.Layout.preferredWidth : contentItem.implicitWidth
                 Layout.fillWidth: contentItem.Layout.fillWidth
diff --git a/src/forms/flat/FormEntry.qml b/src/forms/flat/FormEntry.qml
index 0635d803e..da694cf8f 100644
--- a/src/forms/flat/FormEntry.qml
+++ b/src/forms/flat/FormEntry.qml
@@ -164,7 +164,12 @@ FT.FormEntry {
                 spacing: parent.spacing
                 QQC.Control {
                     id: contentItemWrapper
-                    padding: 0
+
+                    leftPadding: 0
+                    rightPadding: 0
+                    topPadding: 0
+                    bottomPadding: 0
+
                     spacing: parent.spacing // Ensure that `contentItem.parent.spacing` works
                     implicitWidth: contentItem?.Layout.preferredWidth > 0 ? (contentItem?.Layout.preferredWidth ?? 0) : (contentItem?.implicitWidth ?? 0)
                     Layout.fillWidth: contentItem?.Layout.fillWidth ?? false
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.