quickshell: fix qml null safety and monitor property errors (#1770)

This commit is contained in:
end-4
2025-08-08 00:01:31 +07:00
committed by GitHub
5 changed files with 8 additions and 8 deletions
@@ -45,7 +45,7 @@ Item {
elide: Text.ElideRight
text: root.focusingThisMonitor && root.activeWindow?.activated && root.biggestWindow ?
root.activeWindow?.title :
(root.biggestWindow?.title) ?? `${Translation.tr("Workspace")} ${monitor?.activeWorkspace?.id}`
(root.biggestWindow?.title) ?? `${Translation.tr("Workspace")} ${monitor?.activeWorkspace?.id ?? 1}`
}
}
@@ -21,7 +21,7 @@ MouseArea {
MaterialSymbol {
fill: 0
text: WeatherIcons.codeToName[Weather.data.wCode]
text: WeatherIcons.codeToName[Weather.data?.wCode] ?? "question_mark"
iconSize: Appearance.font.pixelSize.large
color: Appearance.colors.colOnLayer1
Layout.alignment: Qt.AlignVCenter
@@ -31,7 +31,7 @@ MouseArea {
visible: true
font.pixelSize: Appearance.font.pixelSize.small
color: Appearance.colors.colOnLayer1
text: Weather.data.temp
text: Weather.data?.temp ?? "--°"
Layout.alignment: Qt.AlignVCenter
}
}