Bug 405614

Summary: Kirigami.Separator has uneven top vs. bottom spacing
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Filip Fila <filipfila.kde>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: minor CC: nate
Priority: NOR    
Version: Master   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.59

Description Filip Fila 2019-03-18 21:49:49 UTC
SUMMARY
Kirigami separator is drawn very close to the top item, but leaves plenty of space below itself. It would be visually more pleasurable to have equal top and bottom spacing.

OBSERVED RESULT
https://i.imgur.com/DBcmnnO.png

EXPECTED RESULT
https://i.imgur.com/Z0X36o3.png
Comment 1 Nate Graham 2019-03-18 23:29:11 UTC
Could be a good patch opportunity. :) Maybe something to do with this?

https://cgit.kde.org/kirigami.git/tree/src/controls/FormLayout.qml#n171
Comment 2 Filip Fila 2019-05-24 15:43:04 UTC
Git commit 80abbd88b0eb505a2603911163246e54426f0450 by Filip Fila.
Committed on 24/05/2019 at 15:42.
Pushed by filipf into branch 'master'.

[FormLayout] Use even top and bottom spacing for separator

Summary:
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.

Test Plan:
Before:
{F6775026}

After:
{F6775027}

Reviewers: mart, #kirigami, ngraham

Reviewed By: mart, #kirigami, ngraham

Subscribers: plasma-devel

Tags: #kirigami

Differential Revision: https://phabricator.kde.org/D20585

M  +1    -0    src/controls/FormLayout.qml

https://commits.kde.org/kirigami/80abbd88b0eb505a2603911163246e54426f0450
Comment 3 Marco Martin 2019-05-28 16:44:59 UTC
Git commit 58c270b054f9f3ca8ed699380f52d4a890b8e90c by Marco Martin.
Committed on 28/05/2019 at 16:43.
Pushed by mart into branch 'master'.

base on height for items that should have a top padding

when we have a simple
Item {
  Kirigami.FormData.isSeparator: true
}

we don't want top padding and that will have 0x0 size.
anything that has an own display, will get a top padding

M  +1    -1    src/controls/FormLayout.qml

https://commits.kde.org/kirigami/58c270b054f9f3ca8ed699380f52d4a890b8e90c