From 59437ec087ba306195a2c8ee27063d61b4dc227a Mon Sep 17 00:00:00 2001 From: Dusko Angirevic Date: Thu, 20 Jul 2017 15:26:20 +0200 Subject: [PATCH] v0.2.0 Candidate --- harbour-tooter.pro | 3 ++- harbour-tooter.pro.user | 8 ++++---- qml/pages/Conversation.qml | 1 + qml/pages/Settings.qml | 20 ++++++++++++++++++-- qml/pages/components/MyImage.qml | 16 ++++++++++++++++ rpm/harbour-tooter.spec | 2 +- rpm/harbour-tooter.yaml | 2 +- 7 files changed, 43 insertions(+), 9 deletions(-) diff --git a/harbour-tooter.pro b/harbour-tooter.pro index 91834ed..85540d8 100644 --- a/harbour-tooter.pro +++ b/harbour-tooter.pro @@ -66,7 +66,8 @@ DISTFILES += \ qml/images/boosted.svg \ qml/pages/Settings.qml \ qml/pages/components/MediaBlock.qml \ - qml/pages/components/MyImage.qml + qml/pages/components/MyImage.qml \ + qml/pages/components/ImageFullScreen.qml HEADERS += \ src/imageuploader.h diff --git a/harbour-tooter.pro.user b/harbour-tooter.pro.user index 6609cda..0c4020f 100644 --- a/harbour-tooter.pro.user +++ b/harbour-tooter.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -8,7 +8,7 @@ ProjectExplorer.Project.ActiveTarget - 0 + 1 ProjectExplorer.Project.EditorSettings @@ -403,7 +403,7 @@ 1 - harbour-tooter (on Mer Device) + harbour-tooter (on Remote Device) QmakeProjectManager.MerRunConfiguration:harbour-tooter @@ -768,7 +768,7 @@ 1 - harbour-tooter (on Mer Device) + harbour-tooter (on Remote Device) QmakeProjectManager.MerRunConfiguration:harbour-tooter diff --git a/qml/pages/Conversation.qml b/qml/pages/Conversation.qml index 7e90368..27a2d30 100644 --- a/qml/pages/Conversation.qml +++ b/qml/pages/Conversation.qml @@ -312,6 +312,7 @@ Page { worker.sendMessage(msg); warningContent.text = "" toot.text = "" + mediaModel.clear() } } diff --git a/qml/pages/Settings.qml b/qml/pages/Settings.qml index ac9b568..a2b0356 100644 --- a/qml/pages/Settings.qml +++ b/qml/pages/Settings.qml @@ -23,7 +23,10 @@ Page { text: Logic.conf['login'] ? qsTr("Remove Account"): qsTr("Add Account") description: Logic.conf['login'] ? qsTr("Deauthorize this app and remove your account") : qsTr("Authorize this app to use your Mastodon account in your behalf") icon.source: Logic.conf['login'] ? "image://theme/icon-m-people" : "image://theme/icon-m-add" - onClicked: { + onCheckedChanged: { + busy = true; + checked = false; + timer1.start() if (Logic.conf['login']) { Logic.conf['login'] = false Logic.conf['instance'] = null; @@ -31,6 +34,11 @@ Page { } pageStack.push(Qt.resolvedUrl("LoginPage.qml")) } + Timer { + id: timer1 + interval: 4700 + onTriggered: parent.busy = false + } } IconTextSwitch { //enabled: false @@ -46,8 +54,16 @@ Page { text: qsTr("Translate") description: qsTr("Use Transifex to help with app translation to your language") icon.source: "image://theme/icon-m-presence" - onClicked: { + onCheckedChanged: { + busy = true; + checked = false; Qt.openUrlExternally("https://www.transifex.com/dysko/tooter/"); + timer2.start() + } + Timer { + id: timer2 + interval: 4700 + onTriggered: parent.busy = false } } } diff --git a/qml/pages/components/MyImage.qml b/qml/pages/components/MyImage.qml index ccaac7a..1527d4e 100644 --- a/qml/pages/components/MyImage.qml +++ b/qml/pages/components/MyImage.qml @@ -16,6 +16,13 @@ Item { anchors.centerIn: parent source: "image://theme/icon-m-image" } + Rectangle { + id: progressRec + anchors.bottom: parent.bottom + width: 0 + height: Theme.paddingSmall + color: Theme.highlightBackgroundColor + } Image { id: img anchors.fill: parent @@ -24,6 +31,15 @@ Item { opacity: status === Image.Ready ? 1.0 : 0.0 Behavior on opacity { FadeAnimator {} } source: previewURL + onProgressChanged: { + if (progress != 1) + progressRec.width = parent.width * progress + else { + progressRec.width = 0; + } + } + + MouseArea { anchors.fill: parent onClicked: { diff --git a/rpm/harbour-tooter.spec b/rpm/harbour-tooter.spec index f501ba0..b45527e 100644 --- a/rpm/harbour-tooter.spec +++ b/rpm/harbour-tooter.spec @@ -13,7 +13,7 @@ Name: harbour-tooter %{!?qtc_make:%define qtc_make make} %{?qtc_builddir:%define _builddir %qtc_builddir} Summary: Tooter -Version: 0.1.9 +Version: 0.2.0 Release: 1 Group: Qt/Qt License: LICENSE diff --git a/rpm/harbour-tooter.yaml b/rpm/harbour-tooter.yaml index d75ffda..fea9efc 100644 --- a/rpm/harbour-tooter.yaml +++ b/rpm/harbour-tooter.yaml @@ -1,6 +1,6 @@ Name: harbour-tooter Summary: Tooter -Version: 0.1.9 +Version: 0.2.0 Release: # The contents of the Group field should be one of the groups listed here: # http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS