diff options
| -rw-r--r-- | modules/launcher/ActionItem.qml | 12 | ||||
| -rw-r--r-- | modules/launcher/AppItem.qml | 10 | ||||
| -rw-r--r-- | modules/launcher/ContentList.qml | 4 | ||||
| -rw-r--r-- | modules/launcher/WallpaperItem.qml | 2 | ||||
| -rw-r--r-- | modules/launcher/WallpaperList.qml | 1 |
5 files changed, 14 insertions, 15 deletions
diff --git a/modules/launcher/ActionItem.qml b/modules/launcher/ActionItem.qml index 800c937..f4f90a2 100644 --- a/modules/launcher/ActionItem.qml +++ b/modules/launcher/ActionItem.qml @@ -11,14 +11,14 @@ Item { implicitHeight: LauncherConfig.sizes.itemHeight - anchors.left: parent.left - anchors.right: parent.right + anchors.left: parent?.left + anchors.right: parent?.right StateLayer { radius: Appearance.rounding.full function onClicked(): void { - root.modelData.onClicked(root.list); + root.modelData?.onClicked(root.list); } } @@ -31,7 +31,7 @@ Item { MaterialIcon { id: icon - text: root.modelData.icon + text: root.modelData?.icon ?? "" font.pointSize: Appearance.font.size.extraLarge anchors.verticalCenter: parent.verticalCenter @@ -48,12 +48,12 @@ Item { StyledText { id: name - text: root.modelData.name + text: root.modelData?.name ?? "" font.pointSize: Appearance.font.size.normal } StyledText { - text: root.modelData.desc + text: root.modelData?.desc ?? "" font.pointSize: Appearance.font.size.small color: Colours.alpha(Colours.palette.m3outline, true) diff --git a/modules/launcher/AppItem.qml b/modules/launcher/AppItem.qml index ab815ab..0b893bb 100644 --- a/modules/launcher/AppItem.qml +++ b/modules/launcher/AppItem.qml @@ -13,8 +13,8 @@ Item { implicitHeight: LauncherConfig.sizes.itemHeight - anchors.left: parent.left - anchors.right: parent.right + anchors.left: parent?.left + anchors.right: parent?.right StateLayer { radius: Appearance.rounding.full @@ -34,7 +34,7 @@ Item { IconImage { id: icon - source: Quickshell.iconPath(root.modelData.icon, "image-missing") + source: Quickshell.iconPath(root.modelData?.icon, "image-missing") implicitSize: parent.height * 0.8 anchors.verticalCenter: parent.verticalCenter @@ -51,12 +51,12 @@ Item { StyledText { id: name - text: root.modelData.name + text: root.modelData?.name ?? "" font.pointSize: Appearance.font.size.normal } StyledText { - text: root.modelData.comment || root.modelData.genericName || root.modelData.name + text: (root.modelData?.comment || root.modelData?.genericName || root.modelData?.name) ?? "" font.pointSize: Appearance.font.size.small color: Colours.alpha(Colours.palette.m3outline, true) diff --git a/modules/launcher/ContentList.qml b/modules/launcher/ContentList.qml index b15daa6..62d5305 100644 --- a/modules/launcher/ContentList.qml +++ b/modules/launcher/ContentList.qml @@ -124,8 +124,8 @@ Item { Item { id: empty - opacity: root.currentList.count === 0 ? 1 : 0 - scale: root.currentList.count === 0 ? 1 : 0.5 + opacity: root.currentList?.count === 0 ? 1 : 0 + scale: root.currentList?.count === 0 ? 1 : 0.5 implicitWidth: icon.width + text.width + Appearance.spacing.small implicitHeight: icon.height diff --git a/modules/launcher/WallpaperItem.qml b/modules/launcher/WallpaperItem.qml index fd8ce9d..dbd482e 100644 --- a/modules/launcher/WallpaperItem.qml +++ b/modules/launcher/WallpaperItem.qml @@ -13,7 +13,7 @@ StyledRect { scale: 0.5 opacity: 0 - z: PathView.z + z: PathView.z ?? 0 Component.onCompleted: { scale = Qt.binding(() => PathView.isCurrentItem ? 1 : PathView.onPath ? 0.8 : 0); diff --git a/modules/launcher/WallpaperList.qml b/modules/launcher/WallpaperList.qml index fd703f2..fef1726 100644 --- a/modules/launcher/WallpaperList.qml +++ b/modules/launcher/WallpaperList.qml @@ -51,7 +51,6 @@ PathView { preferredHighlightBegin: 0.5 preferredHighlightEnd: 0.5 highlightRangeMode: PathView.StrictlyEnforceRange - highlightMoveDuration: Appearance.anim.durations.short delegate: WallpaperItem { visibilities: root.visibilities |