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
e72c789f
Commit
e72c789f
authored
Mar 09, 2014
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Functioning homescreen from Glacier components.
parent
bf053389
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
98 deletions
+33
-98
MainScreen.qml
src/qml/MainScreen.qml
+33
-98
No files found.
src/qml/MainScreen.qml
View file @
e72c789f
...
...
@@ -37,7 +37,7 @@ import QtQuick.Window 2.1
import
org
.
nemomobile
.
time
1.0
import
org
.
nemomobile
.
configuration
1.0
ApplicationWindow
{
Page
{
// This is used in the favorites page and in the lock screen
WallClock
{
...
...
@@ -51,9 +51,7 @@ ApplicationWindow {
key
:
desktop
.
isPortrait
?
"
/desktop/meego/background/portrait/picture_filename
"
:
"
/desktop/meego/background/landscape/picture_filename
"
defaultValue
:
"
images/graphics-wallpaper-home.jpg
"
}
id
:
appWindow
contentOrientation
:
Screen
.
orientation
id
:
desktop
// Implements back key navigation
Keys.onReleased
:
{
...
...
@@ -64,112 +62,49 @@ ApplicationWindow {
}
else
{
Qt
.
quit
();
}
}
}
initialPage
:
Page
{
Item
{
id
:
desktop
property
bool
isPortrait
:
width
<
height
anchors.fill
:
parent
// Pager for swiping between different pages of the home screen
Pager
{
id
:
pager
Pager
{
id
:
pager
scale
:
0.7
+
0.3
*
lockScreen
.
openingState
opacity
:
lockScreen
.
openingState
scale
:
0.7
+
0.3
*
lockScreen
.
openingState
opacity
:
lockScreen
.
openingState
anchors.fill
:
parent
anchors.fill
:
parent
model
:
VisualItemModel
{
AppLauncher
{
id
:
launcher
height
:
pager
.
height
}
AppSwitcher
{
id
:
switcher
width
:
pager
.
width
height
:
pager
.
height
visibleInHome
:
x
>
-
width
&&
x
<
desktop
.
width
}
}
// Initial view should be the AppLauncher
currentIndex
:
1
model
:
VisualItemModel
{
AppLauncher
{
id
:
launcher
height
:
pager
.
height
}
Lockscreen
{
id
:
lockScreen
width
:
parent
.
width
height
:
parent
.
height
z
:
200
onOpeningStateChanged
:
{
// When fully closed, reset the current page
if
(
openingState
!==
0
)
return
// Focus the switcher if any applications are running, otherwise the launcher
if
(
switcher
.
runningAppsCount
>
0
)
{
pager
.
currentIndex
=
2
}
else
{
pager
.
currentIndex
=
1
}
}
AppSwitcher
{
id
:
switcher
width
:
pager
.
width
height
:
pager
.
height
visibleInHome
:
x
>
-
width
&&
x
<
desktop
.
width
}
}
tools
:
Item
{
id
:
toolsLayoutItem
anchors.fill
:
parent
// Initial view should be the AppLauncher
currentIndex
:
1
}
Lockscreen
{
id
:
lockScreen
property
string
title
:
"
Glacier UI
"
property
StackView
pageStack
:
findStackView
(
toolsLayoutItem
)
width
:
parent
.
width
height
:
parent
.
height
//XXX: TEMPORARY CODE, MIGHT CAUSE LAG WHEN PUSHING A PAGE ON THE STACK
function
findStackView
(
startingItem
)
{
var
myStack
=
startingItem
while
(
myStack
)
{
if
(
myStack
.
hasOwnProperty
(
"
currentItem
"
)
&&
myStack
.
hasOwnProperty
(
"
initialItem
"
))
return
myStack
myStack
=
myStack
.
parent
}
return
null
}
z
:
200
Rectangle
{
id
:
backButton
width
:
opacity
?
60
:
0
anchors.left
:
parent
.
left
anchors.leftMargin
:
20
//check if Stack.view has already been initialized as well
opacity
:
(
pageStack
&&
(
pageStack
.
depth
>
1
))
?
1
:
0
anchors.verticalCenter
:
parent
.
verticalCenter
antialiasing
:
true
height
:
60
radius
:
4
color
:
backmouse
.
pressed
?
"
#222
"
:
"
transparent
"
Behavior
on
opacity
{
NumberAnimation
{}
}
Image
{
anchors.verticalCenter
:
parent
.
verticalCenter
source
:
"
images/navigation_previous_item.png
"
}
MouseArea
{
id
:
backmouse
anchors.fill
:
parent
anchors.margins
:
-
10
onClicked
:
pageStack
.
pop
()
}
}
onOpeningStateChanged
:
{
// When fully closed, reset the current page
if
(
openingState
!==
0
)
return
Label
{
font.pixelSize
:
42
Behavior
on
x
{
NumberAnimation
{
easing.type
:
Easing
.
OutCubic
}
}
x
:
backButton
.
x
+
backButton
.
width
+
20
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
parent
.
title
// Focus the switcher if any applications are running, otherwise the launcher
if
(
switcher
.
runningAppsCount
>
0
)
{
pager
.
currentIndex
=
2
}
else
{
pager
.
currentIndex
=
1
}
}
}
}
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