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
9c7bb822
Commit
9c7bb822
authored
Apr 27, 2014
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[lockscreen] Remove logic from old lockscreen.
parent
d15e9c45
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
95 deletions
+2
-95
Lockscreen.qml
src/qml/Lockscreen.qml
+1
-77
MainScreen.qml
src/qml/MainScreen.qml
+1
-18
No files found.
src/qml/Lockscreen.qml
View file @
9c7bb822
...
@@ -9,31 +9,9 @@ Image {
...
@@ -9,31 +9,9 @@ Image {
* the lockscreen is "down" (obscures the view) and 1 means the
* the lockscreen is "down" (obscures the view) and 1 means the
* lockscreen is "up" (not visible).
* lockscreen is "up" (not visible).
**/
**/
property
real
openingState
:
y
/
-
height
visible
:
LipstickSettings
.
lockscreenVisible
visible
:
openingState
<
1
onHeightChanged
:
{
if
(
mouseArea
.
fingerDown
)
return
// we'll fix this up on touch release via the animations
if
(
snapOpenAnimation
.
running
)
snapOpenAnimation
.
to
=
-
height
else
if
(
!
snapClosedAnimation
.
running
&&
!
LipstickSettings
.
lockscreenVisible
)
y
=
-
height
}
function
snapPosition
()
{
function
snapPosition
()
{
if
(
LipstickSettings
.
lockscreenVisible
)
{
snapOpenAnimation
.
stop
()
snapClosedAnimation
.
start
()
}
else
{
snapClosedAnimation
.
stop
()
snapOpenAnimation
.
start
()
}
}
function
cancelSnap
()
{
snapClosedAnimation
.
stop
()
snapOpenAnimation
.
stop
()
}
}
Connections
{
Connections
{
...
@@ -41,60 +19,6 @@ Image {
...
@@ -41,60 +19,6 @@ Image {
onLockscreenVisibleChanged
:
snapPosition
()
onLockscreenVisibleChanged
:
snapPosition
()
}
}
PropertyAnimation
{
id
:
snapClosedAnimation
target
:
lockScreen
property
:
"
y
"
to
:
0
easing.type
:
Easing
.
OutBounce
duration
:
400
}
PropertyAnimation
{
id
:
snapOpenAnimation
target
:
lockScreen
property
:
"
y
"
to
:
-
height
easing.type
:
Easing
.
OutExpo
duration
:
400
}
MouseArea
{
id
:
mouseArea
property
int
pressY
:
0
property
bool
fingerDown
property
bool
ignoreEvents
anchors.fill
:
parent
onPressed
:
{
fingerDown
=
true
cancelSnap
()
pressY
=
mouseY
}
onPositionChanged
:
{
var
delta
=
pressY
-
mouseY
pressY
=
mouseY
+
delta
if
(
parent
.
y
-
delta
>
0
)
return
parent
.
y
=
parent
.
y
-
delta
}
function
snapBack
()
{
fingerDown
=
false
if
(
!
LipstickSettings
.
lockscreenVisible
||
Math
.
abs
(
parent
.
y
)
>
parent
.
height
/
3
)
{
LipstickSettings
.
lockscreenVisible
=
false
}
else
if
(
LipstickSettings
.
lockscreenVisible
)
{
LipstickSettings
.
lockscreenVisible
=
true
}
lockScreen
.
snapPosition
()
}
onCanceled
:
snapBack
()
onReleased
:
snapBack
()
}
LockscreenClock
{
LockscreenClock
{
anchors
{
anchors
{
top
:
parent
.
top
top
:
parent
.
top
...
...
src/qml/MainScreen.qml
View file @
9c7bb822
...
@@ -54,7 +54,7 @@ Page {
...
@@ -54,7 +54,7 @@ Page {
defaultValue
:
"
images/graphics-wallpaper-home.jpg
"
defaultValue
:
"
images/graphics-wallpaper-home.jpg
"
}
}
id
:
desktop
id
:
desktop
property
alias
lockscreen
:
lockScreen
// Implements back key navigation
// Implements back key navigation
Keys.onReleased
:
{
Keys.onReleased
:
{
if
(
event
.
key
===
Qt
.
Key_Back
)
{
if
(
event
.
key
===
Qt
.
Key_Back
)
{
...
@@ -131,9 +131,6 @@ Page {
...
@@ -131,9 +131,6 @@ Page {
Pager
{
Pager
{
id
:
pager
id
:
pager
scale
:
0.7
+
0.3
*
lockScreen
.
openingState
opacity
:
lockScreen
.
openingState
anchors.fill
:
parent
anchors.fill
:
parent
model
:
VisualItemModel
{
model
:
VisualItemModel
{
...
@@ -162,20 +159,6 @@ Page {
...
@@ -162,20 +159,6 @@ Page {
width
:
parent
.
width
width
:
parent
.
width
height
:
parent
.
height
height
:
parent
.
height
z
:
200
z
:
200
onOpeningStateChanged
:
{
// When fully closed, reset the current page
if
(
openingState
!==
0
)
return
// Focus the switcher if any applications are running, otherwise the launcher
if
(
switcher
.
runningAppsCount
>
0
)
{
pager
.
currentIndex
=
2
}
else
{
pager
.
currentIndex
=
1
}
}
}
}
}
}
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