Bug 462300 - Excessive margins around Kirigami.Separator in FormLayout
Summary: Excessive margins around Kirigami.Separator in FormLayout
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: Master
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-11-27 09:06 UTC by Kai Uwe Broulik
Modified: 2022-12-07 14:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.102
Sentry Crash Report:


Attachments
Screenshot of FormLayout (27.64 KB, image/png)
2022-11-27 09:06 UTC, Kai Uwe Broulik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2022-11-27 09:06:40 UTC
Created attachment 154074 [details]
Screenshot of FormLayout

SUMMARY
When a Kirigami.Separator is used in a FormLayout as a section, there's excessive padding ontop of it. This wasn't there originally.

STEPS TO REPRODUCE

import QtQuick 2.15
import org.kde.kirigami 2.12 as Kirigami

Kirigami.FormLayout {
    width: 200
    
    Text {
        text: "item above separator"
    }
    
    Kirigami.Separator {
        Kirigami.FormData.isSection: true
    }
    
    Text {
        text: "item below separator"
    }
}

OBSERVED RESULT
Excessive padding above the separator

EXPECTED RESULT
Equal spacing above and below the separator

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: git master as of 2022-11-21

ADDITIONAL INFORMATION
Compare to original notification KCM which didn't have this: https://blog.broulik.de/wp-content/uploads/2019/05/Screenshot_20190508_094309.png
Comment 1 Nate Graham 2022-11-30 20:54:41 UTC
Yeah, confirmed.
Comment 2 Nate Graham 2022-12-02 00:27:44 UTC
Tried to GammaRay this to find out which item causes the unwanted extra spacing, and it reproducibly crashes the moment I navigate into the FormLayout. :/
Comment 3 Bug Janitor Service 2022-12-02 01:08:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/850
Comment 4 Nate Graham 2022-12-07 14:26:23 UTC
Git commit 6cfe4af123a98ecacec5580a5e228a847789d9ad by Nate Graham.
Committed on 07/12/2022 at 14:26.
Pushed by ngraham into branch 'master'.

FormLayout: remove excessive spacing above unlabeled separators

The clear intention of the code (as even evidenced by a code comment)
was to add more spacing above the label of a labeled separator item
being used as a section header. But the code was not checking for
whether the separator actually had a label, so the extra spacing log
was being inappropriately applied to all separator items.
FIXED-IN: 5.102

M  +2    -3    src/controls/FormLayout.qml

https://invent.kde.org/frameworks/kirigami/commit/6cfe4af123a98ecacec5580a5e228a847789d9ad