blob: f4f5f46ebd854c3a5100bac2fd8a33b2e7ae17a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
Rectangle {
id: popup
radius: 5
border.color: "#000000"
border.width: 2
smooth: true
color: "#5e5e5e"
state: "invisible"
states: [
State {
name: "invisible"
PropertyChanges { target: popup; opacity: 0 }
},
State {
name: "visible"
PropertyChanges { target: popup; opacity: 1.0 }
}
]
transitions: Transition {
NumberAnimation { properties: "opacity"; duration: 100 }
}
function toggle() {
if (state == "visible")
state = "invisible";
else
state = "visible";
}
}
|