Tweaked UI, moved common code to its own component
authorLuciano Montanaro <mikelima@cirulla.net>
Fri, 9 Dec 2011 20:06:04 +0000 (21:06 +0100)
committerLuciano Montanaro <mikelima@cirulla.net>
Tue, 27 Dec 2011 22:19:13 +0000 (23:19 +0100)
application/resources/harmattan/qml/DroppedShadow.qml [new file with mode: 0644]
application/resources/harmattan/qml/StationListPage.qml
application/resources/harmattan/qml/StationPage.qml

diff --git a/application/resources/harmattan/qml/DroppedShadow.qml b/application/resources/harmattan/qml/DroppedShadow.qml
new file mode 100644 (file)
index 0000000..3e3e513
--- /dev/null
@@ -0,0 +1,13 @@
+import QtQuick 1.0
+
+Rectangle {
+    id: shadow
+    width: parent.width
+    height: 5
+    z: 10
+
+    gradient: Gradient {
+        GradientStop {color: "#99000000"; position: 0.0}
+        GradientStop {color: "#00000000"; position: 1.0}
+    }
+}
index 60f6360..04272c6 100644 (file)
@@ -18,6 +18,17 @@ Page {
         id: menu
         content: MenuLayout {
             MenuItem {
+                text: qsTr("Update Periodically")
+                Switch {
+                    id: periodicCheckSwitch
+                    anchors {
+                        verticalCenter: parent.verticalCenter
+                        right: parent.right
+                        rightMargin: UiConstants.DefaultMargin
+                    }
+                }
+            }
+            MenuItem {
                 text: qsTr("About Quando Parte")
                 onClicked: Private.showAboutPage()
             }
@@ -62,15 +73,9 @@ Page {
             left: parent.left
             right: parent.right
         }
-        Rectangle {
+        DroppedShadow {
             id: shadow
-            width: parent.width
             anchors.top: mainView.top
-            height: 5
-            gradient: Gradient {
-                GradientStop {color: "#aa000000"; position: 0.0}
-                GradientStop {color: "#00000000"; position: 1.0}
-            }
         }
         ListView {
             id: stationListView
@@ -90,7 +95,7 @@ Page {
                     anchors.fill: parent
                     // Fill page borders
                     visible: mouseArea.pressed
-                    source: "image://theme/meegotouch-list-background-pressed-center"
+                    source: "image://theme/meegotouch-list-fullwidth-background-pressed"
                 }
                 Row {
                     anchors.fill: parent
@@ -108,6 +113,13 @@ Page {
                         }
                     }
                 }
+                Image {
+                    anchors {
+                        left: parent.left
+                        right: parent.right
+                    }
+                    source: "image://theme/meegotouch-separator-background-horizontal"
+                }
                 MouseArea {
                     id: mouseArea
                     anchors.fill: background
@@ -152,22 +164,6 @@ Page {
                         anchors.right: parent.right
                     }
                 }
-                Item {
-                    height: 40
-                    anchors.leftMargin: UiConstants.DefaultMargin
-                    anchors.left: parent.left
-                    anchors.right: parent.right
-                    Label {
-                        font.bold: true
-                        text: qsTr("Update Display Periodically")
-                        anchors.verticalCenter: parent.verticalCenter
-                    }
-                    Switch {
-                        anchors.verticalCenter: parent.verticalCenter
-                        anchors.right: parent.right
-                        id: periodicCheckSwitch
-                    }
-                }
             }
         }
     }
index 1e6a7b5..c49f3ea 100644 (file)
@@ -32,15 +32,9 @@ Page {
         anchors.top: header.bottom
         text: parent.name
     }
-    Rectangle {
+    DroppedShadow {
         id: shadow
-        width: parent.width
         anchors.top: view.top
-        height: 5
-        gradient: Gradient {
-            GradientStop {color: "#aa000000"; position: 0.0}
-            GradientStop {color: "#00000000"; position: 1.0}
-        }
     }
     Binding {
         target: settings
@@ -122,8 +116,9 @@ Page {
                 }
             }
         }
-        SectionScroller {
-            listView: stationScheduleView
+        ScrollDecorator {
+            id: decorator
+            flickableItem: stationScheduleView
         }
         BusyIndicator {
             id: busyIndicator