Commit e72c789f authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

Functioning homescreen from Glacier components.

parent bf053389
...@@ -37,7 +37,7 @@ import QtQuick.Window 2.1 ...@@ -37,7 +37,7 @@ import QtQuick.Window 2.1
import org.nemomobile.time 1.0 import org.nemomobile.time 1.0
import org.nemomobile.configuration 1.0 import org.nemomobile.configuration 1.0
ApplicationWindow { Page {
// This is used in the favorites page and in the lock screen // This is used in the favorites page and in the lock screen
WallClock { WallClock {
...@@ -51,9 +51,7 @@ ApplicationWindow { ...@@ -51,9 +51,7 @@ ApplicationWindow {
key: desktop.isPortrait ? "/desktop/meego/background/portrait/picture_filename" : "/desktop/meego/background/landscape/picture_filename" key: desktop.isPortrait ? "/desktop/meego/background/portrait/picture_filename" : "/desktop/meego/background/landscape/picture_filename"
defaultValue: "images/graphics-wallpaper-home.jpg" defaultValue: "images/graphics-wallpaper-home.jpg"
} }
id: appWindow id: desktop
contentOrientation: Screen.orientation
// Implements back key navigation // Implements back key navigation
Keys.onReleased: { Keys.onReleased: {
...@@ -64,14 +62,6 @@ ApplicationWindow { ...@@ -64,14 +62,6 @@ ApplicationWindow {
} else { Qt.quit(); } } 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 { Pager {
id: pager id: pager
...@@ -117,59 +107,4 @@ ApplicationWindow { ...@@ -117,59 +107,4 @@ ApplicationWindow {
} }
} }
} }
}
tools: Item {
id: toolsLayoutItem
anchors.fill: parent
property string title: "Glacier UI"
property StackView pageStack: findStackView(toolsLayoutItem)
//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
}
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()
}
}
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
}
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment