homescreens/halcyon: Fix gridview alignment, rename file to be more descriptive

This commit is contained in:
Devin Lin 2022-06-28 13:43:55 -04:00
parent 02bcf78742
commit 4f3b9a1fae
3 changed files with 4 additions and 4 deletions

View file

@ -45,6 +45,6 @@ QQC2.AbstractButton {
HoverHandler {
id: hoverHandler
acceptedDevices: PointerDevice.Mouse
acceptedPointerTypes: PointerDevice.Generic
acceptedPointerTypes: PointerDevice.GenericPointer
}
}

View file

@ -73,12 +73,12 @@ GridView {
delegate: MobileShell.BaseItem {
id: baseItem
readonly property bool isLeftColumn: !root.twoColumn || (root.count % model.index !== 0)
readonly property bool isRightColumn: !root.twoColumn || (root.count % model.index === 0)
readonly property bool isLeftColumn: !root.twoColumn || ((model.index % 2) === 0)
readonly property bool isRightColumn: !root.twoColumn || ((model.index % 2) !== 0)
leftPadding: isLeftColumn ? root.leftMargin : 0
rightPadding: isRightColumn ? root.rightMargin : 0
contentItem: DrawerListDelegate {
contentItem: FavoritesAppDelegate {
implicitWidth: root.cellWidth - (baseItem.isLeftColumn ? root.leftMargin : 0) - (baseItem.isRightColumn ? root.rightMargin : 0)
implicitHeight: visible ? root.cellHeight : 0
}