[frameworks/kirigami] src/forms: FormEntry: make it possible to get the inner spacing
Noah Davis <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 4db6e6a729e2e1fa48808037da33870833f833c3 by Noah Davis.
Committed on 17/08/2026 at 14:53.
Pushed by ndavis into branch 'master'.
FormEntry: make it possible to get the inner spacing
In practice, you might get it with `contentItem.parent.spacing` or like this:
```qml
FormEntry {
contentItem: ColumnLayout {
spacing: parent.spacing
}
}
```
M +1 -0 src/forms/cards/FormEntry.qml
M +1 -0 src/forms/flat/FormEntry.qml
https://invent.kde.org/frameworks/kirigami/-/commit/4db6e6a729e2e1fa48808037da33870833f833c3
diff --git a/src/forms/cards/FormEntry.qml b/src/forms/cards/FormEntry.qml
index 9000ac550..338e5ee85 100644
--- a/src/forms/cards/FormEntry.qml
+++ b/src/forms/cards/FormEntry.qml
@@ -143,6 +143,7 @@ FT.FormEntry {
id: contentItemWrapper
padding: 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
Layout.minimumWidth: contentItem.Layout.minimumWidth
diff --git a/src/forms/flat/FormEntry.qml b/src/forms/flat/FormEntry.qml
index 4ca71cf92..0635d803e 100644
--- a/src/forms/flat/FormEntry.qml
+++ b/src/forms/flat/FormEntry.qml
@@ -165,6 +165,7 @@ FT.FormEntry {
QQC.Control {
id: contentItemWrapper
padding: 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
Layout.minimumWidth: contentItem?.Layout.minimumWidth ?? -1