Bug 399958 - Consider making FormLayout centered by default
Summary: Consider making FormLayout centered by default
Status: RESOLVED INTENTIONAL
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Other Linux
: NOR minor
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-18 04:18 UTC by Nate Graham
Modified: 2018-10-18 19:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.