SystemDialog: Simplify superfluous binding of a constant color, add null check

This commit is contained in:
ivan tkachenko 2024-02-20 22:31:18 +06:00
parent ec37300c9e
commit 18d6b5a5b6
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -67,13 +67,13 @@ Item {
required property Kirigami.AbstractApplicationWindow window required property Kirigami.AbstractApplicationWindow window
function present() { function present() {
root.window.showFullScreen() window.showFullScreen()
} }
onWindowChanged: { onWindowChanged: {
window.color = Qt.binding(() => { if (window) {
return Qt.rgba(0, 0, 0, 0.5) window.color = Qt.rgba(0, 0, 0, 0.5);
}) }
} }
// load in async to speed up load times (especially on embedded devices) // load in async to speed up load times (especially on embedded devices)