mirror of
https://github.com/L4ki/Jolly-Plasma-Themes.git
synced 2026-02-05 15:08:44 +01:00
Add files via upload
This commit is contained in:
56
Jolly SDDM Themes/Jolly-SDDM-6/Background.qml
Normal file
56
Jolly SDDM Themes/Jolly-SDDM-6/Background.qml
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user