From 4f3b9a1fae1be50cbf0a34147392510c9cd51a08 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Tue, 28 Jun 2022 13:43:55 -0400 Subject: [PATCH] homescreens/halcyon: Fix gridview alignment, rename file to be more descriptive --- .../mobileshell/qml/components/ExtendedAbstractButton.qml | 2 +- .../ui/{DrawerListDelegate.qml => FavoritesAppDelegate.qml} | 0 .../halcyon/package/contents/ui/FavoritesGrid.qml | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) rename containments/homescreens/halcyon/package/contents/ui/{DrawerListDelegate.qml => FavoritesAppDelegate.qml} (100%) diff --git a/components/mobileshell/qml/components/ExtendedAbstractButton.qml b/components/mobileshell/qml/components/ExtendedAbstractButton.qml index c184b267..78fdb0eb 100644 --- a/components/mobileshell/qml/components/ExtendedAbstractButton.qml +++ b/components/mobileshell/qml/components/ExtendedAbstractButton.qml @@ -45,6 +45,6 @@ QQC2.AbstractButton { HoverHandler { id: hoverHandler acceptedDevices: PointerDevice.Mouse - acceptedPointerTypes: PointerDevice.Generic + acceptedPointerTypes: PointerDevice.GenericPointer } } diff --git a/containments/homescreens/halcyon/package/contents/ui/DrawerListDelegate.qml b/containments/homescreens/halcyon/package/contents/ui/FavoritesAppDelegate.qml similarity index 100% rename from containments/homescreens/halcyon/package/contents/ui/DrawerListDelegate.qml rename to containments/homescreens/halcyon/package/contents/ui/FavoritesAppDelegate.qml diff --git a/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml b/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml index 4e39e956..92f6b3cc 100644 --- a/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml +++ b/containments/homescreens/halcyon/package/contents/ui/FavoritesGrid.qml @@ -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 }