-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainForm.ui.qml
More file actions
executable file
·82 lines (72 loc) · 1.79 KB
/
MainForm.ui.qml
File metadata and controls
executable file
·82 lines (72 loc) · 1.79 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import QtQuick 2.5
import QtGraphicalEffects 1.0
import "Components"
Rectangle {
id: mainForm
anchors.fill: parent
property alias textPassword: textField
property alias imgUser: user
Image {
id: image
fillMode: Image.PreserveAspectCrop
anchors.fill: parent
antialiasing: true
source: "file://" + Context.background()
}
FastBlur {
id: fastBlur
anchors.fill: image
source: image
radius: 50
}
Image {
id: user
y: parent.height / 4
x: (parent.width / 2) - (width / 2)
width: 100
height: 100
fillMode: Image.PreserveAspectCrop
antialiasing: true
visible: false
source: "file:///usr/share/emmi-greeter/users/" + Context.lastUser() + ".jpg"
}
Rectangle {
x: user.x - 2
y: user.y - 2
width: user.width + 4
height: user.height + 4
radius: user.width + 4
color: "transparent"
border {width: 4; color: "#007fff"}
}
OpacityMask {
anchors.fill: user
source: user
maskSource: Rectangle {
width: user.width
height: user.height
radius: user.width
visible: false // this also needs to be invisible or it will cover up the image
}
}
TextField {
id: textField
y: (user.y + user.height) + 30
x: (parent.width / 2) - (width / 2)
width: 250
height: 35
bg.opacity: 1
textColor: "#333"
maxLength: 20
size: 12
effectColor: "#007fff"
text: ""
password: true
Keys.onReturnPressed: {
Context.passwordRespond(text)
}
}
Component.onCompleted: {
textField.setFocus()
}
}