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
623057c3
Commit
623057c3
authored
Nov 16, 2014
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32 from filippz/master
Prevent lockscreen/shutdownscreen from rotating and minor improvements
parents
79a7eb36
f8487c86
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
6 deletions
+42
-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
main.cpp
src/main.cpp
+2
-0
GlacierRotation.qml
src/qml/GlacierRotation.qml
+6
-0
MainScreen.qml
src/qml/MainScreen.qml
+15
-2
ShutdownScreen.qml
src/qml/ShutdownScreen.qml
+17
-2
No files found.
rpm/lipstick-glacier-home-qt5.spec
View file @
623057c3
...
@@ -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.1
7
Version: 0.1
8
Release: 1
Release: 1
Group: System/GUI/Other
Group: System/GUI/Other
License: BSD
License: BSD
...
...
rpm/lipstick-glacier-home-qt5.yaml
View file @
623057c3
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.1
7
Version
:
0.1
8
Release
:
1
Release
:
1
Group
:
System/GUI/Other
Group
:
System/GUI/Other
License
:
BSD
License
:
BSD
...
...
src/main.cpp
View file @
623057c3
...
@@ -57,6 +57,8 @@ int main(int argc, char **argv)
...
@@ -57,6 +57,8 @@ int main(int argc, char **argv)
nativeOrientation
=
app
.
primaryScreen
()
->
nativeOrientation
();
nativeOrientation
=
app
.
primaryScreen
()
->
nativeOrientation
();
}
}
}
}
if
(
nativeOrientation
==
Qt
::
PrimaryOrientation
)
nativeOrientation
=
app
.
primaryScreen
()
->
primaryOrientation
();
app
.
engine
()
->
rootContext
()
->
setContextProperty
(
"nativeOrientation"
,
nativeOrientation
);
app
.
engine
()
->
rootContext
()
->
setContextProperty
(
"nativeOrientation"
,
nativeOrientation
);
qmlRegisterType
<
GlacierWindowModel
>
(
"org.nemomobile.glacier"
,
1
,
0
,
"GlacierWindowModel"
);
qmlRegisterType
<
GlacierWindowModel
>
(
"org.nemomobile.glacier"
,
1
,
0
,
"GlacierWindowModel"
);
app
.
setQmlPath
(
"/usr/share/lipstick-glacier-home-qt5/qml/MainScreen.qml"
);
app
.
setQmlPath
(
"/usr/share/lipstick-glacier-home-qt5/qml/MainScreen.qml"
);
...
...
src/qml/GlacierRotation.qml
View file @
623057c3
...
@@ -41,6 +41,12 @@ Item {
...
@@ -41,6 +41,12 @@ Item {
property
bool
nativeIsPortrait
:
((
nativeRotation
===
0
)
||
(
nativeRotation
===
180
))
property
bool
nativeIsPortrait
:
((
nativeRotation
===
0
)
||
(
nativeRotation
===
180
))
}
}
property
Item
rotationParent
function
rotateRotationParent
(
o
)
{
rotateObject
(
rotationParent
,
o
)
}
function
rotateObject
(
obj
,
o
)
{
function
rotateObject
(
obj
,
o
)
{
var
r
=
Screen
.
angleBetween
(
o
,
Screen
.
primaryOrientation
)
var
r
=
Screen
.
angleBetween
(
o
,
Screen
.
primaryOrientation
)
...
...
src/qml/MainScreen.qml
View file @
623057c3
...
@@ -72,16 +72,18 @@ Page {
...
@@ -72,16 +72,18 @@ Page {
GlacierRotation
{
GlacierRotation
{
id
:
glacierRotation
id
:
glacierRotation
rotationParent
:
desktop
.
parent
}
}
orientation
:
Lipstick
.
compositor
.
screenOrientation
orientation
:
Lipstick
.
compositor
.
screenOrientation
onOrientationChanged
:
{
onOrientationChanged
:
{
glacierRotation
.
rotateObject
(
desktop
.
parent
,
orientation
)
if
(
!
lockscreenVisible
())
glacierRotation
.
rotateRotationParent
(
orientation
)
}
}
onParentChanged
:
{
onParentChanged
:
{
glacierRotation
.
rotate
Object
(
desktop
.
parent
,
nativeOrientation
)
glacierRotation
.
rotate
RotationParent
(
nativeOrientation
)
}
}
Component
.
onCompleted
:
{
Component
.
onCompleted
:
{
...
@@ -89,6 +91,17 @@ Page {
...
@@ -89,6 +91,17 @@ Page {
Lipstick
.
compositor
.
screenOrientation
=
nativeOrientation
Lipstick
.
compositor
.
screenOrientation
=
nativeOrientation
}
}
Connections
{
target
:
LipstickSettings
onLockscreenVisibleChanged
:
{
if
(
lockscreenVisible
())
{
glacierRotation
.
rotateRotationParent
(
nativeOrientation
)
}
else
{
glacierRotation
.
rotateRotationParent
(
desktop
.
orientation
)
}
}
}
function
lockscreenVisible
()
{
function
lockscreenVisible
()
{
return
LipstickSettings
.
lockscreenVisible
===
true
return
LipstickSettings
.
lockscreenVisible
===
true
}
}
...
...
src/qml/ShutdownScreen.qml
View file @
623057c3
import
QtQuick
2.0
import
QtQuick
2.0
import
QtQuick
.
Window
2.0
import
QtQuick
.
Window
2.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
lipstick
0.1
import
"
..
"
Rectangle
{
Rectangle
{
id
:
shutdownWindow
id
:
shutdownWindow
width
:
Screen
.
width
width
:
parent
.
width
height
:
Screen
.
height
height
:
parent
.
height
color
:
"
black
"
color
:
"
black
"
property
bool
shouldVisible
property
bool
shouldVisible
opacity
:
shutdownScreen
.
windowVisible
opacity
:
shutdownScreen
.
windowVisible
GlacierRotation
{
id
:
glacierRotation
rotationParent
:
shutdownWindow
.
parent
}
Connections
{
target
:
shutdownScreen
onWindowVisibleChanged
:
{
if
(
shutdownScreen
.
windowVisible
)
{
glacierRotation
.
rotateRotationParent
(
nativeOrientation
)
}
}
}
Image
{
Image
{
anchors.centerIn
:
parent
anchors.centerIn
:
parent
source
:
shutdownMode
?
""
:
"
image://theme/graphic-shutdown-logo
"
source
:
shutdownMode
?
""
:
"
image://theme/graphic-shutdown-logo
"
...
...
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