diff --git a/sidebar/package/contents/ui/CategoriesPage.qml b/sidebar/package/contents/ui/CategoriesPage.qml --- a/sidebar/package/contents/ui/CategoriesPage.qml +++ b/sidebar/package/contents/ui/CategoriesPage.qml @@ -29,17 +29,20 @@ header: Item { width: mainColumn.width - height:searchLayout.height + Kirigami.Units.smallSpacing * 2 + height: searchLayout.implicitHeight + Kirigami.Units.smallSpacing * 2 RowLayout { id: searchLayout - height: Math.max(menuButton.height, Kirigami.Units.gridUnit * 2) + height: menuButton.height + spacing: Kirigami.Units.smallSpacing anchors { fill: parent margins: Kirigami.Units.smallSpacing } QtControls.ToolButton { id: menuButton iconName: "application-menu" + Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 + Layout.maximumHeight: width menu: QtControls.Menu { id: globalMenu QtControls.MenuItem { @@ -67,6 +70,8 @@ QtControls.TextField { id: searchField focus: true + Layout.minimumHeight: Layout.maximumHeight + Layout.maximumHeight: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 Layout.fillWidth: true placeholderText: i18n("Search...") onTextChanged: { @@ -99,7 +104,7 @@ anchors { left: parent.left right: parent.right - bottom: parent.bottom + top: parent.bottom } } } @@ -128,30 +133,23 @@ onContentYChanged: systemsettings.hideToolTip(); section { property: "categoryDisplayRole" - delegate: Item { - width: categoryView.width - height: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 4 - Kirigami.Separator { + delegate: Kirigami.AbstractListItem { + enabled: false + separatorVisible: false + RowLayout { anchors { left: parent.left right: parent.right - bottom: sectionLabel.top - } - visible: parent.y > 0 - } - Kirigami.Label { - anchors { - bottom: parent.bottom - left: parent.left - right: parent.right leftMargin: Kirigami.Units.smallSpacing } - id: sectionLabel - text: section - opacity: 0.3 - elide: Text.ElideRight - //FIXME: kirigami bug, why? - Component.onCompleted: font.bold = true + Kirigami.Label { + id: sectionLabel + text: section + Layout.minimumHeight: Math.max(implicitHeight, Kirigami.Units.iconSizes.smallMedium) + elide: Text.ElideRight + //FIXME: kirigami bug, why? + Component.onCompleted: font.bold = true + } } } } diff --git a/sidebar/package/contents/ui/SubCategoryPage.qml b/sidebar/package/contents/ui/SubCategoryPage.qml --- a/sidebar/package/contents/ui/SubCategoryPage.qml +++ b/sidebar/package/contents/ui/SubCategoryPage.qml @@ -27,22 +27,28 @@ id: subCategoryColumn header: Item { width: subCategoryColumn.width - height: topLayout.height + Kirigami.Units.smallSpacing * 2 + height: topLayout.implicitHeight + Kirigami.Units.smallSpacing * 2 RowLayout { id: topLayout - height: Math.max(backButton.height, Kirigami.Units.gridUnit * 2) + height: backButton.height + spacing: Kirigami.Units.smallSpacing anchors { fill: parent margins: Kirigami.Units.smallSpacing + leftMargin: backButton.visible ? Kirigami.Units.smallSpacing : Kirigami.Units.smallSpacing * 2 } QtControls.ToolButton { id: backButton + Layout.maximumWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 + Layout.maximumHeight: width visible: !applicationWindow().wideScreen iconName: "go-previous" onClicked: root.pageStack.currentIndex = 0; } Kirigami.Label { Layout.fillWidth: true + Layout.minimumHeight: Layout.maximumHeight + Layout.maximumHeight: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.smallSpacing * 2 text: subCategoryColumn.title elide: Text.ElideRight opacity: 0.3 @@ -54,7 +60,7 @@ anchors { left: parent.left right: parent.right - bottom: parent.bottom + top: parent.bottom } } }