Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtquickcontrols-nemo
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
qtquickcontrols-nemo
Commits
c2dfacb8
Commit
c2dfacb8
authored
Oct 16, 2017
by
eekkelund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Header] Quick fix to make header work with Qt5.9
parent
64231caa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
Header.qml
src/controls/qml/Header.qml
+9
-8
No files found.
src/controls/qml/Header.qml
View file @
c2dfacb8
...
...
@@ -183,7 +183,8 @@ Item {
color
:
Theme
.
backgroundColor
FilteringMouseArea
{
//TODO: Check if changing this FilteringMouseArea->MouseArea has any side effects
MouseArea
{
id
:
mouseArea
anchors.fill
:
parent
property
bool
swiping
:
false
...
...
@@ -215,18 +216,18 @@ Item {
}
if
(
appWindow
.
isUiPortrait
)
{
startMouseCoord
=
(
pos
.
y
+
root
.
y
)
startMouseCoord
=
(
mouse
.
y
+
root
.
y
)
startCoord
=
root
.
y
}
else
{
//assuming that otherwise we're in landscape...is this safe?
startMouseCoord
=
(
pos
.
x
+
root
.
x
)
startMouseCoord
=
(
mouse
.
x
+
root
.
x
)
startCoord
=
root
.
x
}
}
onPositionChanged
:
{
if
(
appWindow
.
isUiPortrait
)
{
deltaCoord
=
(
pos
.
y
+
root
.
y
)
-
startMouseCoord
if
(
Math
.
abs
(
deltaCoord
)
>
swipeThreshold
&&
!
swiping
)
{
grabMouseEvents
();
swiping
=
true
;
}
deltaCoord
=
(
mouse
.
y
+
root
.
y
)
-
startMouseCoord
if
(
Math
.
abs
(
deltaCoord
)
>
swipeThreshold
&&
!
swiping
)
{
swiping
=
true
;
}
if
(
swiping
)
{
var
swipingY
=
startCoord
+
deltaCoord
...
...
@@ -238,8 +239,8 @@ Item {
}
}
}
else
{
deltaCoord
=
(
pos
.
x
+
root
.
x
)
-
startMouseCoord
if
(
Math
.
abs
(
deltaCoord
)
>
swipeThreshold
&&
!
swiping
)
{
grabMouseEvents
();
swiping
=
true
;
}
deltaCoord
=
(
mouse
.
x
+
root
.
x
)
-
startMouseCoord
if
(
Math
.
abs
(
deltaCoord
)
>
swipeThreshold
&&
!
swiping
)
{
swiping
=
true
;
}
if
(
swiping
)
{
//this is the coord that the drawer would be at if it were following our finger
var
swipingX
=
startCoord
+
deltaCoord
...
...
@@ -285,7 +286,7 @@ Item {
//Fully Close/Open the drawer
root
.
slideDrawerTo
((
root
.
x
==
root
.
closedX
)
?
0
:
root
.
closedX
)
}
else
{
deltaCoord
=
(
pos
.
x
+
root
.
x
)
-
startMouseCoord
deltaCoord
=
(
mouse
.
x
+
root
.
x
)
-
startMouseCoord
if
(
deltaCoord
>
gestureThreshold
)
{
root
.
slideDrawerTo
(
startCoord
<
0
?
0
:
closedX
)
}
else
if
(
deltaCoord
<
-
gestureThreshold
){
...
...
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