1
0
Fork 0
mirror of https://github.com/vinceliuice/MacSequoia-kde.git synced 2024-11-22 05:40:09 +00:00
MacSequoia-kde/sddm/MacSequoia-6.0/Background.qml

57 lines
1.4 KiB
QML
Raw Normal View History

2024-06-30 04:16:38 +00:00
/*
SPDX-FileCopyrightText: 2016 Boudhayan Gupta <bgupta@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.15
FocusScope {
id: sceneBackground
property var sceneBackgroundType
property alias sceneBackgroundColor: sceneColorBackground.color
property alias sceneBackgroundImage: sceneImageBackground.source
Rectangle {
id: sceneColorBackground
anchors.fill: parent
}
Image {
id: sceneImageBackground
anchors.fill: parent
sourceSize.width: parent.width
sourceSize.height: parent.height
fillMode: Image.PreserveAspectCrop
smooth: true;
}
states: [
State {
name: "imageBackground"
when: sceneBackgroundType === "image"
PropertyChanges {
target: sceneColorBackground
visible: false
}
PropertyChanges {
target: sceneImageBackground
visible: true
}
},
State {
name: "colorBackground"
when: sceneBackgroundType !== "image"
PropertyChanges {
target: sceneColorBackground
visible: true
}
PropertyChanges {
target: sceneImageBackground
visible: false
}
}
]
}