From 11de9daf82f7481799d5c962f12147b5d42eee6f Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Mon, 4 Jan 2021 23:42:36 +0200 Subject: [PATCH 1/2] Prettier styles for the about page. Changed the search field to a SearchField. --- qml/pages/About.qml | 89 ++++++++++++++++++++++++------------------ qml/pages/MainView.qml | 12 ++---- 2 files changed, 56 insertions(+), 45 deletions(-) diff --git a/qml/pages/About.qml b/qml/pages/About.qml index 033c690..b396330 100644 --- a/qml/pages/About.qml +++ b/qml/pages/About.qml @@ -66,71 +66,86 @@ Page { font.bold: true text: "SailOTP " + Qt.application.version } - TextArea { - id: desc + Label { anchors.horizontalCenter: parent.horizontalCenter width: parent.width horizontalAlignment: TextEdit.Center - readOnly: true - text: qsTr("A Simple Sailfish OTP Generator\n(RFC 6238/4226 compatible)") + text: qsTr("A simple Sailfish OTP generator") color: Theme.primaryColor } - TextArea { - id: copyright + Label { anchors.horizontalCenter: parent.horizontalCenter width: parent.width horizontalAlignment: TextEdit.Center - readOnly: true - text: qsTr("Copyright: Stefan Brand\nLicense: BSD (3-clause)") + font.pixelSize: Theme.fontSizeSmall + text: qsTr("(RFC 6238/4226 compatible)") color: Theme.primaryColor } Button { - id: manual + text: qsTr("Online Manual") anchors.horizontalCenter: parent.horizontalCenter - text: "Online Manual" onClicked: { Qt.openUrlExternally("https://www.seiichiro0185.org/sailfish:apps:sailotp:manual") } } Button { - id: homepage + text: qsTr("Source Code & Issue Tracker") anchors.horizontalCenter: parent.horizontalCenter - text: "Source Code & Issue Tracker" onClicked: { Qt.openUrlExternally("https://github.com/seiichiro0185/sailotp/") } } - TextArea { - id: acknowledgement - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - font.pixelSize: Theme.fontSizeSmall - horizontalAlignment: TextEdit.Center - readOnly: true - text: "\n"+qsTr("SailOTP uses the following third party libs:")+"\n\nhttp://caligatio.github.io/jsSHA/\nhttps://code.google.com/archive/p/crypto-js/\nhttp://sourceforge.net/projects/qzxing/\nhttp://fukuchi.org/works/qrencode/" - color: Theme.primaryColor + DetailItem { + width: parent.width + label: qsTr("Copyright") + value: "Stefan Brand" } - - TextArea { - id: contributors - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - font.pixelSize: Theme.fontSizeSmall - horizontalAlignment: TextEdit.Center - readOnly: true - text: qsTr("Contributors:")+"\n\nRobin Appelman: SteamGuard "+qsTr("Support") - color: Theme.primaryColor + DetailItem { + width: parent.width + label: qsTr("License") + value: qsTr("BSD (3-clause)") } - - TextArea { - id: translators + Label { anchors.horizontalCenter: parent.horizontalCenter width: parent.width font.pixelSize: Theme.fontSizeSmall horizontalAlignment: TextEdit.Center - readOnly: true - text: qsTr("Translators:")+"\n\nChinese: BirdZhang\nFinnish: Johan Heikkilä\nFrench: Romain Tartière\nItalian: Tichy\nDutch: JSEHV\nRussian: moorchegue\nSpanish: p4moedo\nSwedish: Åke Engelbrektson\nEnglish: Stefan Brand\nGerman: Stefan Brand" - color: Theme.primaryColor + wrapMode: Text.WordWrap + text: qsTr("Contributors:") + color: Theme.secondaryHighlightColor + } + DetailItem { + label: qsTr("SteamGuard support") + value: "Robin Appelman" + } + Label { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width + font.pixelSize: Theme.fontSizeSmall + horizontalAlignment: Text.Center + wrapMode: Text.WordWrap + text: qsTr("Translators:") + color: Theme.secondaryHighlightColor + } + Label { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width * 0.8 + font.pixelSize: Theme.fontSizeSmall + wrapMode: Text.WordWrap + text: "Chinese: BirdZhang\nFinnish: Johan Heikkilä\nFrench: Romain Tartière\nItalian: Tichy\nDutch: JSEHV\nRussian: moorchegue\nSpanish: p4moedo\nSwedish: Åke Engelbrektson\nEnglish: Stefan Brand\nGerman: Stefan Brand" + color: Theme.highlightColor + } + LinkedLabel { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width + font.pixelSize: Theme.fontSizeSmall + horizontalAlignment: TextEdit.Center + plainText: "\n"+qsTr("SailOTP uses the following third party libs:")+' + http://caligatio.github.io/jsSHA/ + https://code.google.com/archive/p/crypto-js/ + http://sourceforge.net/projects/qzxing/ + http://fukuchi.org/works/qrencode/' + color: Theme.secondaryHighlightColor } } VerticalScrollDecorator { } diff --git a/qml/pages/MainView.qml b/qml/pages/MainView.qml index 577a39a..f1e57b9 100644 --- a/qml/pages/MainView.qml +++ b/qml/pages/MainView.qml @@ -159,10 +159,12 @@ Page { Row { id: searchRow width: parent.width - TextField { + SearchField { id: searchField font.pixelSize: Theme.fontSizeMedium - width: parent.width - clearIcon.width + width: parent.width +// This would be useful, but seems to break the button altogether. Perhaps it'll work later? +// canHide: true EnterKey.enabled: false inputMethodHints: Qt.ImhNoPredictiveText // Qt.ImhPreferUppercase | Qt.ImhNoAutoUppercase placeholderText: qsTr("Search") @@ -172,12 +174,6 @@ Page { } } } - IconButton { - id: clearIcon - icon.source: "image://theme/icon-m-backspace" - onClicked: searchField.text = "" - enabled: searchField.text.length > 0 - } } } From 5d06fcf5cd1b452281607332d7bc7f75ca6c40e9 Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Tue, 5 Jan 2021 16:31:53 +0200 Subject: [PATCH 2/2] Add some paddings and update to locales --- qml/pages/About.qml | 47 +++++++++-------- translations/harbour-sailotp-fi.ts | 81 +++++++++++++++++++----------- translations/harbour-sailotp.ts | 79 ++++++++++++++++++----------- 3 files changed, 129 insertions(+), 78 deletions(-) diff --git a/qml/pages/About.qml b/qml/pages/About.qml index b396330..fa87166 100644 --- a/qml/pages/About.qml +++ b/qml/pages/About.qml @@ -47,13 +47,10 @@ Page { width: parent.width spacing: Theme.paddingSmall - TextArea { - id: spacer - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - readOnly: true - text: "" - height: Theme.paddingLarge*2 + // Spacer + Item { + width: parent.width + height: Theme.paddingLarge } Image { id: logo @@ -81,6 +78,11 @@ Page { text: qsTr("(RFC 6238/4226 compatible)") color: Theme.primaryColor } + // Spacer + Item { + width: parent.width + height: Theme.paddingMedium + } Button { text: qsTr("Online Manual") anchors.horizontalCenter: parent.horizontalCenter @@ -95,15 +97,20 @@ Page { Qt.openUrlExternally("https://github.com/seiichiro0185/sailotp/") } } - DetailItem { - width: parent.width - label: qsTr("Copyright") - value: "Stefan Brand" + // Spacer + Item { + width: parent.width + height: Theme.paddingMedium } DetailItem { - width: parent.width - label: qsTr("License") - value: qsTr("BSD (3-clause)") + width: parent.width + label: qsTr("Copyright") + value: "Stefan Brand" + } + DetailItem { + width: parent.width + label: qsTr("License") + value: qsTr("BSD (3-clause)") } Label { anchors.horizontalCenter: parent.horizontalCenter @@ -115,8 +122,8 @@ Page { color: Theme.secondaryHighlightColor } DetailItem { - label: qsTr("SteamGuard support") - value: "Robin Appelman" + label: qsTr("SteamGuard support") + value: "Robin Appelman" } Label { anchors.horizontalCenter: parent.horizontalCenter @@ -141,10 +148,10 @@ Page { font.pixelSize: Theme.fontSizeSmall horizontalAlignment: TextEdit.Center plainText: "\n"+qsTr("SailOTP uses the following third party libs:")+' - http://caligatio.github.io/jsSHA/ - https://code.google.com/archive/p/crypto-js/ - http://sourceforge.net/projects/qzxing/ - http://fukuchi.org/works/qrencode/' + http://caligatio.github.io/jsSHA/ + https://code.google.com/archive/p/crypto-js/ + http://sourceforge.net/projects/qzxing/ + http://fukuchi.org/works/qrencode/' color: Theme.secondaryHighlightColor } } diff --git a/translations/harbour-sailotp-fi.ts b/translations/harbour-sailotp-fi.ts index 2556d2e..31f7e1e 100644 --- a/translations/harbour-sailotp-fi.ts +++ b/translations/harbour-sailotp-fi.ts @@ -4,23 +4,29 @@ About - - A Simple Sailfish OTP Generator -(RFC 6238/4226 compatible) - Yksinkertainen OTP- eli kertasalasanasovellus Sailfishille -(RFC 6238-/4226-yhteensopiva) + + Online Manual + Ohje verkossa - - Copyright: Stefan Brand -License: BSD (3-clause) - Copyright: Stefan Brand -Lisenssi: BSD (3 lausekkeen) + + Source Code & Issue Tracker + Lähdekoodi ja virheilmoitukset - - SailOTP uses the following third party libs: - SailOTP käyttää seuraavia kolmannen osapuolen kirjastoja: + + Copyright + Tekijänoikeus + + + + License + Lisenssi + + + + BSD (3-clause) + BSD (3 lauseen) @@ -28,12 +34,27 @@ Lisenssi: BSD (3 lausekkeen) Projektiin osallistuneet: - - Support - Tuki + + SteamGuard support + SteamGuard-tuki - + + SailOTP uses the following third party libs: + SailOTP käyttää seuraavia kolmannen osapuolen kirjastoja: + + + + A simple Sailfish OTP generator + Yksinkertainen OTP- eli kertasalasanasovellus Sailfishille + + + + (RFC 6238/4226 compatible) + (RFC 6238/4226 -yhteensopiva) + + + Translators: Kääntäjät: @@ -281,54 +302,54 @@ Lisenssi: BSD (3 lausekkeen) Vedä alaspäin lisätäksesi kertasalasanatunnuksen - + Search - + Etsi - + Deleting Poistetaan - - + + Token for Kertasalasana palveluun - - + + copied to clipboard on kopioitu leikepöydälle - + Copy to Clipboard Kopioi leikepöydälle - + Show Token as QR-Code Näytä kertasalasana QR-koodina - + Move up Siirrä ylöspäin - + Move down Siirrä alaspäin - + Edit Muokkaa - + Delete Poista diff --git a/translations/harbour-sailotp.ts b/translations/harbour-sailotp.ts index e099db7..b875539 100644 --- a/translations/harbour-sailotp.ts +++ b/translations/harbour-sailotp.ts @@ -4,34 +4,57 @@ About - - A Simple Sailfish OTP Generator -(RFC 6238/4226 compatible) - + + Online Manual + - - Copyright: Stefan Brand -License: BSD (3-clause) - + + Source Code & Issue Tracker + - - SailOTP uses the following third party libs: - + + Copyright + + + + + License + + + + + BSD (3-clause) + Contributors: - Contributor: + - - Support - support + + SteamGuard support + - + + SailOTP uses the following third party libs: + + + + + A simple Sailfish OTP generator + + + + + (RFC 6238/4226 compatible) + + + + Translators: Translators: @@ -279,54 +302,54 @@ License: BSD (3-clause) - + Search - + Deleting - - + + Token for - - + + copied to clipboard - + Copy to Clipboard - + Show Token as QR-Code - + Move up - + Move down - + Edit - + Delete