strip long stations in resultlist
authorFlorian Schweikert <kelvan@logic.at>
Mon, 17 Oct 2011 15:37:00 +0000 (17:37 +0200)
committerFlorian Schweikert <kelvan@logic.at>
Mon, 17 Oct 2011 15:37:00 +0000 (17:37 +0200)
move icon to bottom left
better spacing for result list
removed "Abfahrten" from header to save space
set radius for header rectangle for smoother look

qml/MainPage.qml
qml/ResultRealtime.qml
qml/main.qml

index 0d5e2c8..9b80ee4 100644 (file)
@@ -12,7 +12,7 @@ Page {
         realtimeResult.refresh()
     }
 
-    Image {
+    /*Image {
         id: logo
         source: 'logo.png'
 
@@ -21,7 +21,7 @@ Page {
             top: parent.top
             horizontalCenter: parent.horizontalCenter
         }
-    }
+    }*/
 
     SelectionDialog {
         id: lineSelector
@@ -54,7 +54,7 @@ Page {
 
         id: gline
         anchors {
-            top: logo.bottom
+            top: parent.top
             left: parent.left
             topMargin: 20
             leftMargin: 10
index 13a6ec2..3532743 100644 (file)
@@ -62,6 +62,7 @@ Item {
                  anchors.margins: UIConstants.DEFAULT_MARGIN
 
                  Row {
+                     spacing: 10
                      Text {
                          id: l
                          text: line // <----
@@ -79,7 +80,8 @@ Item {
                          Text {
                              id: s
                              text: station // <----
-                             width: 75
+                             width: parent.parent.parent.width - l.width - dep.width - 10
+                             elide: Text.ElideRight
                              font.pixelSize: UIConstants.FONT_LARGE
                              font.family: ExtrasConstants.FONT_FAMILY_LIGHT
                              color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
@@ -130,6 +132,8 @@ Item {
              width: parent.width
              height: childrenRect.height + 2*UIConstants.DEFAULT_MARGIN
              color: "lightsteelblue"
+             radius: 5.0
+             smooth: true
 
              Text {
                  anchors {
@@ -139,7 +143,7 @@ Item {
                      margins: UIConstants.DEFAULT_MARGIN
                  }
 
-                 text: 'Abfahrten Richtung ' + gdirection
+                 text: 'Richtung ' + gdirection
                  elide: Text.ElideRight
                  font.bold: true
                  font.family: ExtrasConstants.FONT_FAMILY_LIGHT
@@ -149,19 +153,6 @@ Item {
 
          model: ListModel {
              id: departuresModel
-/*
-            ListElement {
-                line: "N60"
-                station: "Schottentor"
-                destination: "Maurer Hauptplatz"
-                departure: 5
-            }
-            ListElement {
-                line: "N38"
-                station: "Schottentor"
-                destination: "Grinzing"
-                departure: 7
-            }*/
          }
          delegate: departureDelegate
 
index 6ee49de..bbffda0 100644 (file)
@@ -24,6 +24,24 @@ PageStackWindow {
               anchors.right: parent.right
               onClicked: mainPage.refresh()
         }
+
+        ToolIcon {
+              platformIconId: enabled ? 'icon-m-toolbar-refresh' : 'icon-m-toolbar-refresh-dimmed'
+              anchors.right: parent.right
+              onClicked: mainPage.refresh()
+        }
+
+        Image {
+            id: logo
+            source: 'logo.png'
+
+            anchors {
+                bottomMargin: 10
+                bottom: parent.bottom
+                left: parent.left
+                leftMargin: 10
+            }
+        }
     }
 
     /*Menu {