Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
glacier-home
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
glacier-home
Commits
20f1806b
Commit
20f1806b
authored
Nov 30, 2016
by
SergeyChupligin
Committed by
Sergey Chupligin
Dec 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[devicelock] Update Lockscreen for Sailfish > 2.0.4
parent
2001859d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
15 deletions
+57
-15
DeviceLockUI.qml
src/qml/DeviceLockUI.qml
+41
-7
Lockscreen.qml
src/qml/Lockscreen.qml
+6
-4
MainScreen.qml
src/qml/MainScreen.qml
+5
-0
compositor.qml
src/qml/compositor.qml
+3
-1
src.pro
src/src.pro
+2
-3
No files found.
src/qml/DeviceLock.qml
→
src/qml/DeviceLock
UI
.qml
View file @
20f1806b
...
...
@@ -4,9 +4,47 @@ import QtQuick.Controls.Nemo 1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtQuick
.
Layouts
1.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
Item
{
id
:
root
property
bool
shouldAuthenticate
:
Lipstick
.
compositor
.
visible
&&
authenticator
.
availableMethods
!==
0
onShouldAuthenticateChanged
:
{
if
(
shouldAuthenticate
)
{
DeviceLock
.
authorization
.
requestChallenge
()
}
else
{
authenticator
.
cancel
()
DeviceLock
.
authorization
.
relinquishChallenge
()
}
}
Component.onCompleted
:
{
DeviceLock
.
authorization
.
requestChallenge
()
}
Connections
{
target
:
DeviceLock
.
authorization
onChallengeIssued
:
{
authenticator
.
authenticate
(
DeviceLock
.
authorization
.
challengeCode
,
DeviceLock
.
authorization
.
allowedMethods
)
}
}
Authenticator
{
id
:
authenticator
onAuthenticated
:
{
DeviceLock
.
unlock
(
authenticationToken
)
}
onFeedback
:
{
console
.
log
(
'
### still locked
'
,
feedback
,
attemptsRemaining
)
}
}
ColumnLayout
{
anchors.fill
:
parent
spacing
:
40
...
...
@@ -25,7 +63,7 @@ Item {
Repeater
{
model
:
[
"
1
"
,
"
2
"
,
"
3
"
,
"
4
"
,
"
5
"
,
"
6
"
,
"
7
"
,
"
8
"
,
"
9
"
,
"
Ca
"
,
"
0
"
,
"
OK
"
]
delegate
:
Button
{
Button
{
style
:
ButtonStyle
{}
Layout.fillWidth
:
true
text
:
modelData
...
...
@@ -34,12 +72,8 @@ Item {
lockCodeField
.
insert
(
lockCodeField
.
cursorPosition
,
text
)
}
else
{
if
(
text
===
"
OK
"
)
{
if
(
deviceLock
.
checkCode
(
lockCodeField
.
text
))
{
deviceLock
.
setState
(
0
)
lockCodeField
.
text
=
""
}
else
{
lockCodeField
.
text
=
""
}
authenticator
.
enterLockCode
(
lockCodeField
.
text
)
lockCodeField
.
text
=
""
}
else
if
(
text
===
"
Ca
"
){
lockCodeField
.
text
=
""
}
...
...
src/qml/Lockscreen.qml
View file @
20f1806b
import
QtQuick
2.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
Image
{
id
:
lockScreen
source
:
"
qrc:/qml/images/graphics-wallpaper-home.jpg
"
visible
:
LipstickSettings
.
lockscreenVisible
||
deviceLock
.
state
===
1
LockscreenClock
{
id
:
clock
...
...
@@ -13,7 +15,7 @@ Image {
right
:
parent
.
right
}
}
DeviceLock
{
DeviceLock
UI
{
id
:
deviceLockUI
anchors
{
top
:
clock
.
bottom
...
...
@@ -21,8 +23,9 @@ Image {
}
height
:
parent
.
height
-
clock
.
height
width
:
parent
.
width
visible
:
deviceLock
.
state
===
1
//visible:
z
:
201
}
...
...
@@ -30,4 +33,3 @@ Image {
anchors.fill
:
parent
}
}
src/qml/MainScreen.qml
View file @
20f1806b
...
...
@@ -34,9 +34,12 @@ import QtQuick.Controls 1.0
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtQuick
.
Window
2.1
import
org
.
nemomobile
.
time
1.0
import
org
.
nemomobile
.
configuration
1.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
import
"
scripts/desktop.js
"
as
Desktop
Page
{
...
...
@@ -149,6 +152,8 @@ Page {
Lockscreen
{
id
:
lockScreen
visible
:
DeviceLock
.
state
>=
DeviceLock
.
Locked
width
:
parent
.
width
height
:
parent
.
height
z
:
200
...
...
src/qml/compositor.qml
View file @
20f1806b
...
...
@@ -24,6 +24,8 @@
import
QtQuick
2.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
import
"
compositor
"
import
"
scripts/desktop.js
"
as
Desktop
...
...
@@ -133,7 +135,7 @@ Compositor {
property
real
lockThreshold
:
0.25
property
int
lockscreenX
property
int
lockscreenY
enabled
:
deviceLock
.
state
===
0
enabled
:
DeviceLock
.
state
==
DeviceLock
.
Unlocked
onGestureStarted
:
{
swipeAnimation
.
stop
()
...
...
src/src.pro
View file @
20f1806b
...
...
@@ -36,7 +36,7 @@ qml.files = qml/MainScreen.qml \
qml
/
CommonPanel
.
qml
\
qml
/
ShutdownScreen
.
qml
\
qml
/
GlacierRotation
.
qml
\
qml
/
DeviceLock
.
qml
qml
/
DeviceLock
UI
.
qml
qmlcompositor
.
path
=
/
usr
/
share
/
lipstick
-
glacier
-
home
-
qt5
/
qml
/
compositor
qmlcompositor
.
files
=
qml
/
compositor
/
WindowWrapperMystic
.
qml
\
...
...
@@ -108,8 +108,7 @@ OTHER_FILES += qml/*.qml \
qml/BatteryPanel.qml \
qml/CommonPanel.qml \
qml/ShutdownScreen.qml \
qml/GlacierRotation.qml \
qml/DeviceLock.qml
qml/GlacierRotation.qml
TRANSLATIONS += i18n/glacer-home.ts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment