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
2976172e
Commit
2976172e
authored
Nov 26, 2014
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #37 from filippz/master
Fix reported gesture when swiping away from apps
parents
38b043ff
5e25bfff
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
lipstick-glacier-home-qt5.spec
rpm/lipstick-glacier-home-qt5.spec
+1
-1
lipstick-glacier-home-qt5.yaml
rpm/lipstick-glacier-home-qt5.yaml
+1
-1
compositor.qml
src/qml/compositor.qml
+2
-2
ScreenGestureArea.qml
src/qml/compositor/ScreenGestureArea.qml
+18
-2
No files found.
rpm/lipstick-glacier-home-qt5.spec
View file @
2976172e
...
...
@@ -9,7 +9,7 @@ Name: lipstick-glacier-home-qt5
# << macros
Summary: A nice homescreen for Glacier experience
Version: 0.2
2
Version: 0.2
3
Release: 1
Group: System/GUI/Other
License: BSD
...
...
rpm/lipstick-glacier-home-qt5.yaml
View file @
2976172e
Name
:
lipstick-glacier-home-qt5
Summary
:
A nice homescreen for Glacier experience
Version
:
0.2
2
Version
:
0.2
3
Release
:
1
Group
:
System/GUI/Other
License
:
BSD
...
...
src/qml/compositor.qml
View file @
2976172e
...
...
@@ -152,7 +152,7 @@ Compositor {
if
(
gestureArea
.
progress
>=
swipeThreshold
)
{
swipeAnimation
.
valueTo
=
inverted
?
-
max
:
max
swipeAnimation
.
start
()
if
(
gesture
Area
.
gesture
==
"
down
"
)
{
if
(
gesture
==
"
down
"
)
{
Lipstick
.
compositor
.
closeClientForWindowId
(
topmostWindow
.
window
.
windowId
)
}
}
else
{
...
...
@@ -160,7 +160,7 @@ Compositor {
}
}
else
if
(
root
.
homeActive
){
if
(
gestureArea
.
progress
>=
lockThreshold
)
{
lockAnimation
.
valueTo
=
(
gesture
Area
.
gesture
==
"
left
"
?
lockAnimation
.
valueTo
=
(
gesture
==
"
left
"
?
Desktop
.
instance
.
lockscreen
.
width
:
-
Desktop
.
instance
.
lockscreen
.
width
)
lockAnimation
.
start
()
...
...
src/qml/compositor/ScreenGestureArea.qml
View file @
2976172e
...
...
@@ -21,6 +21,7 @@
// SOFTWARE.
import
QtQuick
2.0
import
QtQuick
.
Window
2.0
import
org
.
nemomobile
.
lipstick
0.1
MouseArea
{
...
...
@@ -44,11 +45,26 @@ MouseArea {
// Internal
property
int
_mouseStart
property
Item
_mapTo
:
Lipstick
.
compositor
.
homeActive
?
Lipstick
.
compositor
.
topmostWindow
.
window
:
parent
property
variant
_gestures
:
[
"
down
"
,
"
left
"
,
"
up
"
,
"
right
"
]
function
mouseToMouseReal
(
m
)
{
return
mapToItem
(
_mapTo
,
m
.
x
,
m
.
y
)
}
function
realGesture
(
g
)
{
var
r
=
Screen
.
angleBetween
(
Lipstick
.
compositor
.
screenOrientation
,
Screen
.
orientation
)
/
90
if
(
r
===
0
)
return
g
var
shiftedGestures
=
_gestures
.
slice
(
0
)
for
(
var
i
=
0
;
i
<
r
;
i
++
)
{
var
shifted
=
shiftedGestures
.
shift
()
shiftedGestures
.
push
(
shifted
)
}
return
_gestures
[
shiftedGestures
.
indexOf
(
g
)]
}
onPressed
:
{
var
mouseReal
=
mouseToMouseReal
(
mouse
)
...
...
@@ -75,7 +91,7 @@ MouseArea {
else
_mouseStart
=
mouseReal
.
y
gestureStarted
(
gesture
)
gestureStarted
(
Lipstick
.
compositor
.
homeActive
?
gesture
:
realGesture
(
gesture
)
)
}
onPositionChanged
:
{
...
...
@@ -96,7 +112,7 @@ MouseArea {
}
onReleased
:
{
gestureFinished
(
gesture
)
gestureFinished
(
Lipstick
.
compositor
.
homeActive
?
gesture
:
realGesture
(
gesture
)
)
if
(
!
delayReset
)
reset
()
}
...
...
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