Warning, /plasma/plasma-workspace/lookandfeel/sddm-theme/Background.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2016 Boudhayan Gupta <bgupta@kde.org>
0003
0004 SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006
0007 import QtQuick 2.15
0008
0009 FocusScope {
0010 id: sceneBackground
0011
0012 property var sceneBackgroundType
0013 property alias sceneBackgroundColor: sceneColorBackground.color
0014 property alias sceneBackgroundImage: sceneImageBackground.source
0015
0016 Rectangle {
0017 id: sceneColorBackground
0018 anchors.fill: parent
0019 }
0020
0021 Image {
0022 id: sceneImageBackground
0023 anchors.fill: parent
0024 sourceSize.width: parent.width
0025 sourceSize.height: parent.height
0026 fillMode: Image.PreserveAspectCrop
0027 smooth: true;
0028 }
0029
0030 states: [
0031 State {
0032 name: "imageBackground"
0033 when: sceneBackgroundType === "image"
0034 PropertyChanges {
0035 target: sceneColorBackground
0036 visible: false
0037 }
0038 PropertyChanges {
0039 target: sceneImageBackground
0040 visible: true
0041 }
0042 },
0043 State {
0044 name: "colorBackground"
0045 when: sceneBackgroundType !== "image"
0046 PropertyChanges {
0047 target: sceneColorBackground
0048 visible: true
0049 }
0050 PropertyChanges {
0051 target: sceneImageBackground
0052 visible: false
0053 }
0054 }
0055 ]
0056 }