diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-24 13:47:45 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-24 13:47:45 +0800 |
| commit | 4ca23da8e139deaf4615a39e7e7ffbd7fbd3ab61 (patch) | |
| tree | f88ed87462a79518157cd829ade13eff24699b91 /modules/launcher/AppItem.qml | |
| parent | internal: remove padded rect (diff) | |
| download | caelestia-shell-4ca23da8e139deaf4615a39e7e7ffbd7fbd3ab61.tar.gz caelestia-shell-4ca23da8e139deaf4615a39e7e7ffbd7fbd3ab61.tar.bz2 caelestia-shell-4ca23da8e139deaf4615a39e7e7ffbd7fbd3ab61.zip | |
internal: fix null errors
Diffstat (limited to 'modules/launcher/AppItem.qml')
| -rw-r--r-- | modules/launcher/AppItem.qml | 10 |
1 files changed, 5 insertions, 5 deletions
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) |