-
Notifications
You must be signed in to change notification settings - Fork 1
/
ChooseUser.qml
57 lines (47 loc) · 1.14 KB
/
ChooseUser.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
51
52
53
54
55
56
57
import QtQuick 2.0
ListView {
height: currentItem.height + 100
width: this.count * currentItem.width
model: userModel
delegate: UserDelegate {}
currentIndex: userModel.lastIndex
orientation: ListView.Horizontal
flickableDirection: Flickable.AutoFlickIfNeeded
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
focus: true
clip: true
Keys.onReturnPressed: {
page.state = "login";
loginFrame.name = currentItem.name
loginFrame.realName = currentItem.realName
loginFrame.icon = currentItem.icon
focus = false
if (config.autoFocusPassword == "true")
focusDelay.start();
else
loginFrame.focus = true;
}
Timer {
id: focusDelay
interval: 500
running: false
repeat: false
onTriggered: {
loginFrame.focusPassword();
}
}
Image {
id: selector
width: 32
height: 32
source: "Assets/Selector.png"
x: listView.currentItem.x + (listView.currentItem.width / 2) - 16
y: listView.currentItem.y + listView.currentItem.height
Behavior on x {
NumberAnimation { duration: 350; easing.type: Easing.InOutQuad}
}
}
}