-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move ListItem bottom padding into GradientListView and Column spacing #1904
Move ListItem bottom padding into GradientListView and Column spacing #1904
Conversation
Remove the built-in bottom padding from ListItem. This was previously required as a way to add spacing between items, instead of setting explicit 'spacing' on GradientListView or Column views, due to the fact that this would produce additional unwanted spacing for non-visible items within the view. Now that visible items are no longer rendered by the view if VisibleItemModel is used, this built-in padding can be removed, and the spacing can be inserted directly into ListView and Column views instead. Fixes #1827
f00d56f
to
e447c6a
Compare
dataItem.uid: Global.systemSettings.serviceUid + "/Settings/Gui/BriefView/Unit" | ||
footer: Column { | ||
width: parent.width | ||
topPadding: Theme.geometry_gradientList_spacing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern is a bit ugly. I wonder if there's some more elegant solution? (Maybe add a "topSpacing" property to ListItem? but maybe that's just as bad or worse...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was wondering if ListItem should get a topPadding property, but wasn't sure ... I suppose it does already have left/right padding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this would have to be topMargin as it should be outside of the coloured background, rather than within it, unlike the padding. I'll leave it as-is for now, as it feels odd to have to build the margin back into the ListItem, when we've just removed it. @MikeTrahearn-Qinetic suggested that ListItem could eventually become a QtQuick control, which would also provide a built-in API for margin/padding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely take a look as as separate topic, where it makes actual sense to use QtQuick.Controls Control as a base (or even some of the primitive Qt Quick Controls Templates) to bring a much needed architectural simplification across the whole design. This task would be made much easier if the Figma design was componentised like it should be.
I created #1919 as a placeholder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM although I had one nitpick/question
Remove the built-in bottom padding from ListItem. This was previously required as a way to add spacing between items, instead of setting explicit 'spacing' on GradientListView or Column views, due to the fact that this would produce additional unwanted spacing for non-visible items within the view.
Now that visible items are no longer rendered by the view if VisibleItemModel is used, this built-in padding can be removed, and the spacing can be inserted directly into ListView and Column views instead.
Fixes #1827