-
Notifications
You must be signed in to change notification settings - Fork 2
/
AddAccountPopup.qml
50 lines (47 loc) · 1.42 KB
/
AddAccountPopup.qml
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
40
41
42
43
44
45
46
47
48
49
50
import QtQuick 2.4
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
ShadowedPopup {
onOpened: newKeyField.forceActiveFocus()
onClosed: newKeyField.text = ""
acceptButton.text: qsTr("Add Account")
cancelButton.text: qsTr("Don't Add")
property alias newKeyField: newKeyField
property alias infoLabel: infoLabel
TextField {
id: newKeyField
anchors.centerIn: parent
placeholderText: qsTr("Private key or account password")
onAccepted: {
if (acceptButton.enabled)
acceptButton.clicked()
}
}
Label {
id: infoLabel
wrapMode: Label.WrapAtWordBoundaryOrAnywhere
anchors.top: newKeyField.bottom
anchors.topMargin: 4
anchors.left: newKeyField.left
anchors.right: parent.right
anchors.rightMargin: 4
Behavior on text {
SequentialAnimation {
PropertyAnimation {
target: infoLabel
property: "opacity"
from: 1; to: 0
duration: 100
}
PropertyAction { target: infoLabel; property: "text" }
PropertyAnimation {
target: infoLabel
property: "opacity"
from: 0; to: 1
duration: 100
}
}
}
}
}