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
9bbe3191
Commit
9bbe3191
authored
Nov 17, 2014
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #34 from filippz/master
Fix ScreenGestureArea when rotating
parents
17859efd
29a29b97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
13 deletions
+22
-13
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
ScreenGestureArea.qml
src/qml/compositor/ScreenGestureArea.qml
+20
-11
No files found.
rpm/lipstick-glacier-home-qt5.spec
View file @
9bbe3191
...
@@ -9,7 +9,7 @@ Name: lipstick-glacier-home-qt5
...
@@ -9,7 +9,7 @@ Name: lipstick-glacier-home-qt5
# << macros
# << macros
Summary: A nice homescreen for Glacier experience
Summary: A nice homescreen for Glacier experience
Version: 0.
19
Version: 0.
20
Release: 1
Release: 1
Group: System/GUI/Other
Group: System/GUI/Other
License: BSD
License: BSD
...
...
rpm/lipstick-glacier-home-qt5.yaml
View file @
9bbe3191
Name
:
lipstick-glacier-home-qt5
Name
:
lipstick-glacier-home-qt5
Summary
:
A nice homescreen for Glacier experience
Summary
:
A nice homescreen for Glacier experience
Version
:
0.
19
Version
:
0.
20
Release
:
1
Release
:
1
Group
:
System/GUI/Other
Group
:
System/GUI/Other
License
:
BSD
License
:
BSD
...
...
src/qml/compositor/ScreenGestureArea.qml
View file @
9bbe3191
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
// SOFTWARE.
// SOFTWARE.
import
QtQuick
2.0
import
QtQuick
2.0
import
org
.
nemomobile
.
lipstick
0.1
MouseArea
{
MouseArea
{
id
:
root
id
:
root
...
@@ -42,20 +43,27 @@ MouseArea {
...
@@ -42,20 +43,27 @@ MouseArea {
// Internal
// Internal
property
int
_mouseStart
property
int
_mouseStart
property
Item
_mapTo
:
Lipstick
.
compositor
.
topmostWindow
.
window
function
mouseToMouseReal
(
m
)
{
return
mapToItem
(
_mapTo
,
m
.
x
,
m
.
y
)
}
onPressed
:
{
onPressed
:
{
if
(
mouse
.
x
<
boundary
)
{
var
mouseReal
=
mouseToMouseReal
(
mouse
)
if
(
mouseReal
.
x
<
boundary
)
{
gesture
=
"
right
"
gesture
=
"
right
"
max
=
width
-
mouse
.
x
max
=
_mapTo
.
width
-
mouseReal
.
x
}
else
if
(
width
-
mouse
.
x
<
boundary
)
{
}
else
if
(
_mapTo
.
width
-
mouseReal
.
x
<
boundary
)
{
gesture
=
"
left
"
gesture
=
"
left
"
max
=
mouse
.
x
max
=
mouse
Real
.
x
}
else
if
(
mouse
.
y
<
boundary
)
{
}
else
if
(
mouse
Real
.
y
<
boundary
)
{
gesture
=
"
down
"
gesture
=
"
down
"
max
=
height
-
mouse
.
y
max
=
_mapTo
.
height
-
mouseReal
.
y
}
else
if
(
height
-
mouse
.
y
<
boundary
)
{
}
else
if
(
_mapTo
.
height
-
mouseReal
.
y
<
boundary
)
{
gesture
=
"
up
"
gesture
=
"
up
"
max
=
mouse
.
y
max
=
mouse
Real
.
y
}
else
{
}
else
{
mouse
.
accepted
=
false
mouse
.
accepted
=
false
return
return
...
@@ -63,15 +71,16 @@ MouseArea {
...
@@ -63,15 +71,16 @@ MouseArea {
value
=
0
value
=
0
if
(
horizontal
)
if
(
horizontal
)
_mouseStart
=
mouse
.
x
_mouseStart
=
mouse
Real
.
x
else
else
_mouseStart
=
mouse
.
y
_mouseStart
=
mouse
Real
.
y
gestureStarted
(
gesture
)
gestureStarted
(
gesture
)
}
}
onPositionChanged
:
{
onPositionChanged
:
{
var
p
=
horizontal
?
mouse
.
x
:
mouse
.
y
var
mouseReal
=
mouseToMouseReal
(
mouse
)
var
p
=
horizontal
?
mouseReal
.
x
:
mouseReal
.
y
value
=
Math
.
max
(
Math
.
min
(
p
-
_mouseStart
,
max
),
-
max
)
value
=
Math
.
max
(
Math
.
min
(
p
-
_mouseStart
,
max
),
-
max
)
}
}
...
...
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