The Kirigami separator has spacing below it, but not above it when in a Form Layout. This patch adds a check if there is a separator present and if it is, it adds spacing above it.
BUG: 405614
mart | |
ngraham |
Kirigami |
The Kirigami separator has spacing below it, but not above it when in a Form Layout. This patch adds a check if there is a separator present and if it is, it adds spacing above it.
BUG: 405614
Before:
After:
No Linters Available |
No Unit Test Coverage |
Buildable 12037 | |
Build 12055: arc lint + arc unit |
@mart are you sure this is the right solution? From my tests the patch also adds extra spacing whenever there is an instance of isSection, but we'd only want it to do so when there is a separator present.
Before:
After:
We can see in this example when there is no separator that extra (unwanted) spacing has been added.
I don't like adding a new property to separator for doing duck typing...
even is really ugly and errorprone as well, but i would prefer
Layout.topMargin: item.toString().indexOf("Separator")===0 ? Kirigami.Units.smallSpacing : 0
with a comment:
// FIXME: use item instanceof Kirigami.Separator when we can depend from Qt 5.11