Commit 5d4d1e08 authored by Martin Kozub's avatar Martin Kozub

Code clean-ups and fixes, unified color scheme for selected transport type…

Code clean-ups and fixes, unified color scheme for selected transport type specific pages including buttons and other UI elements.
parent 8d5cbc4f
......@@ -37,10 +37,6 @@ MainView {
}
property var headerColor: colorPalete.headerBG
property var baseColor: colorPalete.baseBG
property var baseTextColor: colorPalete.baseText
property var secondaryColor: colorPalete.secondaryBG
property var highlightedTextColor: "#b22"
function setHeaderColor(color) {
headerColor = color || colorPalete.headerBG;
......
......@@ -31,7 +31,7 @@ Component {
anchors.verticalCenter: parent.verticalCenter
width: units.gu(1.5)
height: width
color: pageLayout.colorPalete["headerBG"]
color: pageLayout.headerColor
radius: width
opacity: 0
......
......@@ -57,6 +57,6 @@ Column {
font.pixelSize: FontUtils.sizeToPixels("normal")
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
}
}
......@@ -29,7 +29,7 @@ Item {
right: parent.right
}
height: errorRow.height + 2 * errorRow.anchors.margins + errorLineSeparator.height
color: pageLayout.baseColor
color: pageLayout.colorPalete.baseBG
RowLayout {
id: errorRow
......@@ -51,7 +51,7 @@ Item {
Label {
text: errorMessage.value || ""
color: pageLayout.highlightedTextColor
color: pageLayout.colorPalete.highlightBG
font.pixelSize: FontUtils.sizeToPixels("normal")
font.bold: false
horizontalAlignment: Text.AlignHCenter
......
......@@ -9,7 +9,8 @@ Item {
right: parent.right
}
height: childrenRect.height
property bool followTransportColorScheme: false
property var callbacks: [{}]
function setTite(title) {
......@@ -81,7 +82,7 @@ Item {
id: button
width: rowButtonsLayout.width / rowListModel.count - rowButtonsLayout.spacing
height: 2 * buttonText.contentHeight
color: active ? pageLayout.colorPalete["headerBG"] : "#ddd";
color: active ? (rowPicker.followTransportColorScheme ? pageLayout.headerColor : pageLayout.colorPalete["headerBG"]) : "#ddd";
property bool active: buttonActive || false
......
......@@ -152,7 +152,12 @@ Page {
}
height: dataBarRow.height + 2 * dataBarRow.anchors.margins
Layout.maximumWidth: parent.width - anchors.rightMargin
color: pageLayout.colorPalete["secondaryBG"]
color: pageLayout.headerColor
Rectangle {
anchors.fill: parent
color: Qt.rgba(255, 255, 255, 0.8)
}
RowLayout {
id: dataBarRow
......@@ -171,7 +176,7 @@ Page {
Label {
text: i18n.tr("Distance")
Layout.fillWidth: true
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
wrapMode: Text.WordWrap
font.bold: true
}
......@@ -180,7 +185,7 @@ Page {
id: distanceLabel
text: ""
Layout.fillWidth: true
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
wrapMode: Text.WordWrap
}
}
......@@ -192,7 +197,7 @@ Page {
Label {
text: i18n.tr("Time length")
Layout.fillWidth: true
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
wrapMode: Text.WordWrap
font.bold: true
}
......@@ -201,7 +206,7 @@ Page {
id: timeLabel
text: ""
Layout.fillWidth: true
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
wrapMode: Text.WordWrap
}
}
......@@ -214,7 +219,7 @@ Page {
Label {
text: i18n.tr("Price")
Layout.fillWidth: true
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
wrapMode: Text.WordWrap
font.bold: true
}
......@@ -223,7 +228,7 @@ Page {
id: priceLabel
text: ""
Layout.fillWidth: true
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
wrapMode: Text.WordWrap
}
}
......
......@@ -436,7 +436,7 @@ Page {
Rectangle {
width: mapToolBar.zoomButtonsSize
height: mapToolBar.zoomButtonsSize
color: pageLayout.colorPalete["headerBG"]
color: pageLayout.headerColor
radius: width
Label {
......@@ -452,6 +452,7 @@ Page {
MouseArea {
anchors.fill: parent
onClicked: {
Haptics.play();
if(map.zoomLevel < map.maximumZoomLevel) {
map.zoomLevel = map.zoomLevel += 1;
}
......@@ -462,7 +463,7 @@ Page {
Rectangle {
width: mapToolBar.zoomButtonsSize
height: mapToolBar.zoomButtonsSize
color: pageLayout.colorPalete["headerBG"]
color: pageLayout.headerColor
radius: width
Label {
......@@ -478,6 +479,7 @@ Page {
MouseArea {
anchors.fill: parent
onClicked: {
Haptics.play();
if(map.zoomLevel > map.minimumZoomLevel) {
map.zoomLevel = map.zoomLevel -= 1;
}
......
......@@ -158,6 +158,7 @@ Page {
}
function search() {
searchPage.ignoreGps = (progressLine.state === "running");
from.abort();
to.abort();
via.abort();
......@@ -452,7 +453,7 @@ Page {
Rectangle {
anchors.fill: parent
color: pageLayout.baseColor
color: pageLayout.colorPalete.baseBG
Flickable {
id: searchFlickable
......@@ -495,7 +496,7 @@ Page {
height: parent.height
text: ""
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
font.pixelSize: FontUtils.sizeToPixels("normal")
font.bold: true
wrapMode: Text.WordWrap
......@@ -516,12 +517,12 @@ Page {
height: parent.height
color: "transparent"
onClicked: pageLayout.addPageToNextColumn(searchPage, transportSelectorPage)
onClicked: pageLayout.addPageToNextColumn(searchPage, transportSelectorPage);
Icon {
anchors.fill: parent
name: "view-list-symbolic"
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
}
}
}
......@@ -561,7 +562,7 @@ Page {
Icon {
anchors.fill: parent
name: "swap"
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
}
}
......@@ -589,7 +590,7 @@ Page {
Label {
text: i18n.tr("Via")
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
......@@ -626,7 +627,7 @@ Page {
Label {
text: i18n.tr("Custom date")
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
......@@ -647,6 +648,7 @@ Page {
id: arrivalDeparturePicker
property bool departure: true
property bool followTransportColorScheme: true
property var render: function(model) {
clear();
initialize([i18n.tr("Departure"), i18n.tr("Arrival")], 0, function(itemIndex) {
......
......@@ -175,7 +175,7 @@ Page {
width: parent.width
height: transportDelegateRectangle.height + 2 * transportDelegateRectangle.anchors.margins
divider.visible: true
color: selected ? pageLayout.secondaryColor : "transparent";
color: selected ? pageLayout.colorPalete.secondaryBG : "transparent";
property var selected: false
onVisibleChanged: {
......@@ -416,6 +416,7 @@ Page {
}
onClicked: {
Haptics.play();
if(!transportDelegateItem.expanded) {
composeAction();
}
......@@ -509,7 +510,7 @@ Page {
margins: units.gu(0.75)
}
name: restListView.visible ? "cancel" : "add"
color: pageLayout.baseTextColor
color: pageLayout.colorPalete.baseText
}
}
}
......
"use strict";
var Stop = function(data, parentData) {
this.parentData = parentData || {};
this.dbConnection = this.parentData.dbConnection || null;
if(typeof data === typeof "string") {
this.basic = true;
this.value = data;
this.transportID = this.parentData.transportID || null;
}
else {
this.basic = false;
this.data = data || {};
this.id = this.data.id || -1;
this.data.item = this.data.item || {};
this.transportID = this.parentData.transportID || this.data.key || null;
}
this.parentData = parentData || {};
this.transportID = this.parentData.transportID || this.data.key || null;
this.dbConnection = this.parentData.dbConnection || null;
return this;
return this;
}
Stop.prototype.getName = function() {
......
......@@ -9,7 +9,7 @@
"desktop": "Transport/Transport.desktop"
}
},
"version": "1.7.6-1",
"version": "1.7.7",
"maintainer": "Martin Kozub <zubozrout@gmail.com>",
"framework": "ubuntu-sdk-16.04"
}
......@@ -2,33 +2,34 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-24 21:01+0000\n"
"POT-Creation-Date: 2018-09-27 19:52+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Martin Kozub <zubozrout@gmail.com>, 2017\n"
"Language-Team: Czech (https://www.transifex.com/zubozrout/teams/75311/cs/)\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n "
"<= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/components/ConnectionDetailDelegate.qml:91
msgid "Station name"
msgstr "Název stanice"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/components/ConnectionDetailDelegate.qml:98
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:652
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:654
msgid "Arrival"
msgstr "Příjezd"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/components/ConnectionDetailDelegate.qml:105
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:652
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:654
msgid "Departure"
msgstr "Odjezd"
......@@ -121,7 +122,7 @@ msgid "To"
msgstr "Do"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/components/RecentBottomEdge.qml:239
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:591
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:592
msgid "Via"
msgstr "Přes"
......@@ -151,17 +152,16 @@ msgstr ""
"dopravy."
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/AboutPage.qml:50
msgid ""
"This application is based upon an API provided by CHAPS s.r.o. company."
msgid "This application is based upon an API provided by CHAPS s.r.o. company."
msgstr "Tato aplikace využívá API poskytnuté společností CHAPS s.r.o."
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/AboutPage.qml:50
msgid ""
"You can find the documentation of the API service here "
"http://docs.crws.apiary.io/"
"You can find the documentation of the API service here http://docs.crws."
"apiary.io/"
msgstr ""
"Dokumentaci k využívanému API můžete najít na adrese "
"http://docs.crws.apiary.io/"
"Dokumentaci k využívanému API můžete najít na adrese http://docs.crws.apiary."
"io/"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/AboutPage.qml:51
msgid ""
......@@ -180,8 +180,8 @@ msgstr "Podívejte se na stránku projektu na GitLabu."
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/AboutPage.qml:53
msgid ""
"GDPR notice: CHAPS s.r.o. API can log searched values combined with IP "
"addresses and if such search is enabled device coordinates as well. Platform"
" string \"ubuntu\" is passed with every single query."
"addresses and if such search is enabled device coordinates as well. Platform "
"string \"ubuntu\" is passed with every single query."
msgstr ""
"Upozornění v souvislosti s obecným nařízením o ochraně osobních údajů GDPR: "
"Společnosti CHAPS s.r.o. poskytující API pro vyhledávání jízdních řádů může "
......@@ -211,15 +211,15 @@ msgstr "Jen projížděné stanice"
msgid "All stations"
msgstr "Všechny stanice"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:172
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:177
msgid "Distance"
msgstr "Vzdálenost"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:193
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:198
msgid "Time length"
msgstr "Délka jízdy"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:215
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:220
msgid "Price"
msgstr "Cena"
......@@ -342,19 +342,19 @@ msgstr "Nastavení"
msgid "About"
msgstr "O aplikaci"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:198
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:199
msgid "Search failed"
msgstr "Vyhledávání se nepovedlo"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:628
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:629
msgid "Custom date"
msgstr "Vlastní datum"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:671
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:673
msgid "Abort search"
msgstr "Přerušit vyhledávání"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:671
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:673
msgid "Search"
msgstr "Hledat"
......@@ -418,8 +418,7 @@ msgstr "Stahovat mapové souřadnice pro každý detail spojení"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SettingsPage.qml:153
msgid "If turned off you won't be able to see selected route on the map."
msgstr ""
"Pokud je tato možnost vypnuta, nebudete moci zobrazit zvolenou trasu na "
"mapě."
"Pokud je tato možnost vypnuta, nebudete moci zobrazit zvolenou trasu na mapě."
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SettingsPage.qml:164
msgid "Weekly"
......@@ -470,19 +469,19 @@ msgstr "Aktualizace informací o dopravcích se nezdařila."
msgid "Do you really want to delete all saved stops for %1 transport option?"
msgstr "Skutečně chcete smazat všechny uložené stanice pro dopravce %1?"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:337
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:336
msgid "City:"
msgstr "Město:"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:351
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:350
msgid "Valid from:"
msgstr "Platnost od:"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:365
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:364
msgid "Expires:"
msgstr "Vyprší:"
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:379
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:378
msgid "Vehicles:"
msgstr "Vozidla:"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-24 21:01+0000\n"
"POT-Creation-Date: 2018-09-27 19:52+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -23,12 +23,12 @@ msgid "Station name"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/components/ConnectionDetailDelegate.qml:98
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:652
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:654
msgid "Arrival"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/components/ConnectionDetailDelegate.qml:105
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:652
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:654
msgid "Departure"
msgstr ""
......@@ -117,7 +117,7 @@ msgid "To"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/components/RecentBottomEdge.qml:239
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:591
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:592
msgid "Via"
msgstr ""
......@@ -193,15 +193,15 @@ msgstr ""
msgid "All stations"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:172
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:177
msgid "Distance"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:193
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:198
msgid "Time length"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:215
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/ConnectionDetailPage.qml:220
msgid "Price"
msgstr ""
......@@ -324,19 +324,19 @@ msgstr ""
msgid "About"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:198
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:199
msgid "Search failed"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:628
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:629
msgid "Custom date"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:671
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:673
msgid "Abort search"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:671
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/SearchPage.qml:673
msgid "Search"
msgstr ""
......@@ -443,19 +443,19 @@ msgstr ""
msgid "Do you really want to delete all saved stops for %1 transport option?"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:337
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:336
msgid "City:"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:351
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:350
msgid "Valid from:"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:365
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:364
msgid "Expires:"
msgstr ""
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:379
#: /home/zubozrout/Dokumenty/ubports/transport/Transport/Transport/pages/TransportSelectorPage.qml:378
msgid "Vehicles:"
msgstr ""
......
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