Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c3334d0f authored by Marco Martin's avatar Marco Martin

refine layouts for items to be more aligned

Summary:
as per cdg feedback, remove separator lines in the list,
tweak sizes of items in the toolbar so that the hamburger icon is centered with item icons and the pixel spaces are all the same

Test Plan: tested with different QT_SCALE_FACTOR values

Reviewers: #plasma, #vdg, abetts, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6118
parent 82b96890
......@@ -29,10 +29,11 @@ Kirigami.ScrollablePage {
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
......@@ -40,6 +41,8 @@ Kirigami.ScrollablePage {
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 @@ Kirigami.ScrollablePage {
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 @@ Kirigami.ScrollablePage {
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
top: parent.bottom
}
}
}
......@@ -128,30 +133,23 @@ Kirigami.ScrollablePage {
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
}
}
}
}
......
......@@ -27,22 +27,28 @@ Kirigami.ScrollablePage {
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 @@ Kirigami.ScrollablePage {
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
top: parent.bottom
}
}
}
......
Markdown is supported
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