summaryrefslogtreecommitdiff
path: root/qml/pages
diff options
context:
space:
mode:
authorJavier S. Pedro <dev.git@javispedro.com>2014-09-14 22:24:13 +0200
committerJavier S. Pedro <dev.git@javispedro.com>2014-09-14 22:24:13 +0200
commit48465074989a7c1f2e757b5b67d41b3583dbb7ac (patch)
treeaaec0d7f3df387ec6722a4a4239baa07693b87ce /qml/pages
parent6a581ace4f14c30f1c66daf28064d7aefde546fc (diff)
downloadsalmeta-48465074989a7c1f2e757b5b67d41b3583dbb7ac.tar.gz
salmeta-48465074989a7c1f2e757b5b67d41b3583dbb7ac.zip
make the cover do something relatively useful
Diffstat (limited to 'qml/pages')
-rw-r--r--qml/pages/MainPage.qml1
-rw-r--r--qml/pages/WatchView.qml50
2 files changed, 1 insertions, 50 deletions
diff --git a/qml/pages/MainPage.qml b/qml/pages/MainPage.qml
index 9014a48..6b2893a 100644
--- a/qml/pages/MainPage.qml
+++ b/qml/pages/MainPage.qml
@@ -2,6 +2,7 @@ import QtQuick 2.0
import Sailfish.Silica 1.0
import Sailfish.Bluetooth 1.0
import org.nemomobile.configuration 1.0
+import "../watch"
Page {
id: page
diff --git a/qml/pages/WatchView.qml b/qml/pages/WatchView.qml
deleted file mode 100644
index a5d755e..0000000
--- a/qml/pages/WatchView.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-import QtQuick 2.0
-import "../watch"
-
-Flickable {
- id: watchView
- width: 96
- height: 96
- clip: true
- flickableDirection: Flickable.HorizontalFlick
-
- property int curPage: 0
-
- WidgetView {
- id: widgetView
- model: curWidgets
- editMode: true
- onEmptyWidgetClicked: {
- pageStack.push(Qt.resolvedUrl("AddWidget.qml"), {
- 'addToPage': page,
- 'addToPos': pos
- });
- }
- }
-
- contentWidth: widgetView.width
- contentHeight: widgetView.height
-
- NumberAnimation {
- id: pivotAnim
- targets: watchView
- property: "contentX"
- to: curPage * watchView.width
- duration: 100
- easing.type: Easing.InOutQuad
- }
-
- onMovementStarted: {
- pivotAnim.stop()
- }
-
- onMovementEnded: {
- curPage = Math.round(watchView.contentX / watchView.width)
- pivotAnim.start()
- }
-
- function switchToPage(page) {
- curPage = page;
- pivotAnim.start();
- }
-}