From: Thomas Perl Date: Wed, 14 Mar 2012 17:06:35 +0000 (+0100) Subject: Various UI fixes X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;ds=sidebyside;h=cf9800b03a69ceeb92e8a7bd3b8c5f417fcea0c2;p=pywienerlinien Various UI fixes --- diff --git a/qml/LinePad.qml b/qml/LinePad.qml index ad65bac..bead39c 100644 --- a/qml/LinePad.qml +++ b/qml/LinePad.qml @@ -6,6 +6,8 @@ Rectangle { id: linePad property alias currentLine: inputLine.text + signal accept + /* List of available lines - will be filled w/ real data by LineSheet */ property variant availableLines: ['59A', '63A', '58'] @@ -15,6 +17,7 @@ Rectangle { if (matches !== undefined) { if (matches.length == 1) { inputLine.text = matches[0]; + accept(); } } } @@ -126,9 +129,7 @@ Rectangle { Behavior on opacity { PropertyAnimation { } } color: { - if (ch == 'U') { - return '#156ab8'; - } else if (inputState.isMetro) { + if (inputState.isMetro) { switch (ch) { case 1: return '#E20A16'; case 2: return '#764785'; @@ -144,7 +145,18 @@ Rectangle { x: width*(index%3) y: inputLine.height + height*parseInt(index/3) + Image { + source: 'ubahnicon.png' + anchors { + horizontalCenter: parent.horizontalCenter + bottom: parent.bottom + } + visible: (inputElement.ch === 'U') + } + Text { + id: text + visible: (inputElement.ch !== 'U') anchors.centerIn: parent text: modelData font { diff --git a/qml/LineSheet.qml b/qml/LineSheet.qml index 391eb33..36b74cb 100644 --- a/qml/LineSheet.qml +++ b/qml/LineSheet.qml @@ -13,6 +13,7 @@ Sheet { id: linePad anchors.fill: parent availableLines: itip.get_lines() + onAccept: lineSheet.accept() } } diff --git a/qml/MainPage.qml b/qml/MainPage.qml index 16090f0..c6deee0 100644 --- a/qml/MainPage.qml +++ b/qml/MainPage.qml @@ -7,6 +7,7 @@ import "ExtrasConstants.js" as ExtrasConstants Page { tools: commonTools + orientationLock: PageOrientation.LockPortrait property bool canRefresh: realtimeResult.sourceUrl != '' || (realtimeResult.isStation && realtimeResult.gstation != '') //property alias stationSelect: stationSelector diff --git a/qml/ubahnicon.png b/qml/ubahnicon.png new file mode 100644 index 0000000..a46db0d Binary files /dev/null and b/qml/ubahnicon.png differ