https://bugs.kde.org/show_bug.cgi?id=454999
Bug ID: 454999
Summary: FormLayout adds an extra margin when used in KCMs
Product: frameworks-kirigami
Version: Master
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: Not decided
See this thread:
https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/770#note_391758
Relevant code:
https://invent.kde.org/plasma/plasma-desktop/-/blob/work/thiago/morecomponents/kcms/componentchooser/package/contents/ui/main.qml
Top padding by default looks like this:
https://invent.kde.org/plasma/plasma-desktop/uploads/dc4b35dd87c75f52b6d23b5b99ae6c13/Screenshot_20220204_005022.png
When it should look like this:
https://invent.kde.org/plasma/plasma-desktop/uploads/7a4fd46b33211bdd7af2f40a1593d780/Screenshot_20220204_005503.png
Analogously to the Notifications KCM:
https://invent.kde.org/plasma/plasma-desktop/uploads/fa8ec0fb5ab72eb3af898aa69810607e/Screenshot_20220204_005101.png
Code example taken from MR:
```
import QtQuick 2.12
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.7 as Kirigami
import org.kde.kcm 1.5 as KCM
KCM.SimpleKCM {
topPadding: 0
bottomPadding: 0
Kirigami.FormLayout {
id: form
readonly property int longestComboBox:
Math.max(browserCombo.implicitWidth,
fileManagerCombo.implicitWidth,
textEditorCombo.implicitWidth,
pdfViewerCombo.implicitWidth,
imageViewerCombo.implicitWidth,
musicPlayerCombo.implicitWidth,
videoPlayerCombo.implicitWidth,
emailCombo.implicitWidth,
archiveCombo.implicitWidth,
terminalCombo.implicitWidth,
mapCombo.implicitWidth,
dialerCombo.implicitWidth)
Item {
Kirigami.FormData.label: i18n("Internet")
Kirigami.FormData.isSection: true
}
ComponentComboBox {
id: browserCombo
Layout.preferredWidth: form.longestComboBox
component: kcm.browsers
label: i18n("Web browser:")
}
[...extracodehere...]
}
```
--
You are receiving this mail because:
You are watching all bug changes.