forked from sialan-labs/sigram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAuthenticating.qml
89 lines (75 loc) · 2.24 KB
/
Authenticating.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
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
83
84
85
86
87
88
89
/*
Copyright (C) 2014 Sialan Labs
http://labs.sialan.org
Sigram is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Sigram is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.0
import QtGraphicalEffects 1.0
import org.sialan.telegram 1.0
Item {
id: auth
width: 100
height: 62
property bool started: false
property real panelWidth: 327
Image {
id: auth_img
anchors.top: parent.top
anchors.bottom: parent.bottom
width: auth.width + panelWidth
x: frame.width/2 - panelWidth
sourceSize: Qt.size(width,height)
source: "files/registering_splash.jpg"
smooth: true
fillMode: Image.PreserveAspectCrop
}
Item {
id: frame
anchors.top: parent.top
anchors.bottom: parent.bottom
width: auth.started? panelWidth : 0
clip: true
Behavior on width {
NumberAnimation{ easing.type: Easing.OutBack; duration: 500 }
}
FastBlur {
x: auth_img.x
width: auth_img.width
height: auth_img.height
radius: 128
source: auth_img
}
Rectangle {
anchors.fill: parent
color: "#66ffffff"
}
RegisterFrame {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
width: panelWidth
}
}
Timer {
id: show_timer
interval: 1000
onTriggered: {
if( Telegram.waitAndGet == Enums.NoWaitAndGet )
auth.start()
else
auth.started = true
}
}
function start() {
show_timer.restart()
}
}