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
6e4b5819
Commit
6e4b5819
authored
Nov 14, 2014
by
Filip Matijević
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[rotation] fix positioning bug when rotating by 180 degrees
parent
b2e67dd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
GlacierRotation.qml
src/qml/GlacierRotation.qml
+3
-1
No files found.
src/qml/GlacierRotation.qml
View file @
6e4b5819
...
...
@@ -49,11 +49,13 @@ Item {
var
isPortrait
=
((
r
===
0
)
||
(
r
===
180
))
var
correction
=
0
var
isNative
=
((
privateProperties
.
nativeIsPortrait
||
isPortrait
)
&&
!
(
privateProperties
.
nativeIsPortrait
&&
isPortrait
))
//xor
var
diff
=
Math
.
abs
(
r
-
obj
.
rotation
)
//xor
if
((
isNative
||
!
privateProperties
.
nativeIsPortrait
)
&&
!
(
isNative
&&
!
privateProperties
.
nativeIsPortrait
))
{
correction
=
obj
.
width
/
2
-
obj
.
height
/
2
if
(
diff
===
180
)
correction
=
-
correction
}
var
diff
=
Math
.
abs
(
r
-
obj
.
rotation
)
obj
.
rotation
=
r
if
((
diff
===
90
)
||
(
diff
===
270
))
{
var
w
=
obj
.
width
...
...
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