Commit c701878f authored by Nate Graham's avatar Nate Graham
Browse files

Slightly refactor how list item search padding is done

This lets us use BasicListItem's own icon features rather than
overriding them.
parent c025745d
......@@ -15,16 +15,13 @@ Kirigami.BasicListItem {
property bool selected: delegate.highlighted || delegate.pressed
property bool isSearching: false
text: model.display
leading: RowLayout {
id: row
Kirigami.Icon {
source: model.decoration
Layout.preferredWidth: row.height
Layout.preferredHeight: row.height
Layout.leftMargin: (model.DepthRole > 1 && delegate.isSearching) ? ( model.DepthRole - 1 ) * ( row.height * 1.5 ) : 0
}
leading: Item {
width: (model.DepthRole > 1 && delegate.isSearching) ? (( model.DepthRole - 1 ) * Kirigami.Units.iconSizes.smallMedium) + Kirigami.Units.largeSpacing : 0
}
text: model.display
icon: model.decoration
trailing: RowLayout {
Rectangle {
id: defaultIndicator
......
......@@ -140,7 +140,7 @@ Kirigami.ScrollablePage {
delegate: CategoryItem {
id: delegate
leftPadding: Kirigami.Units.smallSpacing + (Kirigami.Units.smallSpacing + Kirigami.Units.iconSizes.smallMedium) * (model.DepthRole - 2)
// leftPadding: Kirigami.Units.smallSpacing + (Kirigami.Units.smallSpacing + Kirigami.Units.iconSizes.smallMedium) * (model.DepthRole - 2)
onClicked: {
systemsettings.loadModule(subCategoryView.model.index(index, 0));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment