Warning, /plasma/plasma-bigscreen/containments/homescreen/package/contents/ui/launcher/FeedbackWindow.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2015 Marco Martin <notmart@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.14 0008 import QtQuick.Layouts 1.14 0009 import QtQuick.Window 2.14 0010 import org.kde.plasma.core 2.0 as PlasmaCore 0011 import org.kde.plasma.extras 2.0 as PlasmaExtras 0012 import org.kde.kirigami as Kirigami 0013 0014 Window { 0015 id: window 0016 0017 function open(windowName, windowIcon) { 0018 window.title = windowName; 0019 window.icon = windowIcon; 0020 window.state = "open"; 0021 } 0022 property alias state: background.state 0023 property alias icon: icon.source 0024 width: Screen.width 0025 height: Screen.height 0026 color: "transparent" 0027 onVisibleChanged: { 0028 if (!visible) { 0029 background.state = "closed"; 0030 } 0031 } 0032 onActiveChanged: { 0033 if (!active) { 0034 background.state = "closed"; 0035 } 0036 } 0037 0038 Item { 0039 id: background 0040 anchors.fill: parent 0041 Kirigami.Theme.inherit: false 0042 Kirigami.Theme.colorSet: Kirigami.Theme.Complementary 0043 width: window.width 0044 height: window.height 0045 state: "closed" 0046 0047 Rectangle { 0048 anchors.fill: parent 0049 color: Kirigami.Theme.backgroundColor 0050 0051 ColumnLayout { 0052 anchors.centerIn: parent 0053 Kirigami.Icon { 0054 id: icon 0055 Kirigami.Theme.inherit: false 0056 Kirigami.Theme.colorSet: Kirigami.Theme.Complementary 0057 Layout.preferredWidth: Kirigami.Units.iconSizes.enormous 0058 Layout.preferredHeight: Layout.preferredWidth 0059 Layout.alignment: Qt.AlignCenter 0060 } 0061 PlasmaExtras.Heading { 0062 text: window.title 0063 Layout.alignment: Qt.AlignCenter 0064 } 0065 } 0066 } 0067 0068 states: [ 0069 State { 0070 name: "closed" 0071 PropertyChanges { 0072 target: background 0073 scale: 0 0074 } 0075 PropertyChanges { 0076 target: window 0077 visible: false 0078 } 0079 }, 0080 State { 0081 name: "open" 0082 PropertyChanges { 0083 target: background 0084 scale: 1 0085 } 0086 PropertyChanges { 0087 target: window 0088 visible: true 0089 } 0090 } 0091 ] 0092 0093 transitions: [ 0094 Transition { 0095 from: "closed" 0096 SequentialAnimation { 0097 ScriptAction { 0098 script: window.visible = true; 0099 } 0100 PropertyAnimation { 0101 target: background 0102 duration: units.longDuration 0103 easing.type: Easing.InOutQuad 0104 properties: "scale" 0105 } 0106 } 0107 } 0108 ] 0109 } 0110 }