Bug 399958

Summary: Consider making FormLayout centered by default
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Nate Graham <nate>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED INTENTIONAL    
Severity: minor CC: kde
Priority: NOR    
Version: Master   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nate Graham 2018-10-18 04:18:33 UTC
In doing my first port to Kirigami.FormLayout, I'm very impressed so far. It's a nice API to work with. The only issue I ran into was that I had to manually add `anchors.horizontalCenter: parent.horizontalCenter` to get it to be centered, as the HIG prescribes in https://hig.kde.org/patterns/content/form.html.

It would be nice if Kirigami FormLayouts centered themselves automatically unless overridden, just to cut down on the amount of boilerplate needed for implementation.
Comment 1 Kai Uwe Broulik 2018-10-18 06:46:43 UTC
If you do any behavioral changes here make sure to make it consistent with QFormLayout which has always been not centered horizontally for KDE. [1] "Recommended style for KDE applications. Similar to MacStyle, except that the form is left-aligned and all fields grow to fill the available space."

[1] https://doc.qt.io/qt-5/qformlayout.html
Comment 2 Nate Graham 2018-10-18 19:26:22 UTC
Hmm, you're right. I see that QWidgets-based ones are also left-aligned.

I think this should be changed, but yeah, that needs a discussion first.