From 603c1e7ee9a45d7d202e90bc473df27c721ad147 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Mon, 7 Aug 2017 10:48:13 +0200 Subject: Add Keys page --- MiddlePanel.qml | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'MiddlePanel.qml') diff --git a/MiddlePanel.qml b/MiddlePanel.qml index 404a9d40..1ffd3132 100644 --- a/MiddlePanel.qml +++ b/MiddlePanel.qml @@ -58,6 +58,7 @@ Rectangle { property Settings settingsView: Settings { } property Mining miningView: Mining { } property AddressBook addressBookView: AddressBook { } + property Keys keysView: Keys { } signal paymentClicked(string address, string paymentId, string amount, int mixinCount, int priority, string description) @@ -93,33 +94,6 @@ Rectangle { transferView.sendTo(address, paymentId, description); } - - // XXX: just for memo, to be removed - // states: [ - // State { - // name: "Dashboard" - // PropertyChanges { target: loader; source: "pages/Dashboard.qml" } - // }, State { - // name: "History" - // PropertyChanges { target: loader; source: "pages/History.qml" } - // }, State { - // name: "Transfer" - // PropertyChanges { target: loader; source: "pages/Transfer.qml" } - // }, State { - // name: "Receive" - // PropertyChanges { target: loader; source: "pages/Receive.qml" } - // }, State { - // name: "AddressBook" - // PropertyChanges { target: loader; source: "pages/AddressBook.qml" } - // }, State { - // name: "Settings" - // PropertyChanges { target: loader; source: "pages/Settings.qml" } - // }, State { - // name: "Mining" - // PropertyChanges { target: loader; source: "pages/Mining.qml" } - // } - // ] - states: [ State { name: "Dashboard" @@ -157,6 +131,10 @@ Rectangle { name: "Mining" PropertyChanges { target: root; currentView: miningView } PropertyChanges { target: mainFlickable; contentHeight: minHeight } + }, State { + name: "Keys" + PropertyChanges { target: root; currentView: keysView } + PropertyChanges { target: mainFlickable; contentHeight: minHeight } } ] @@ -195,11 +173,7 @@ Rectangle { StackView { id: stackView initialItem: transferView - // anchors.topMargin: 30 - // Layout.fillWidth: true - // Layout.fillHeight: true anchors.fill:parent - // anchors.margins: 4 clip: true // otherwise animation will affect left panel delegate: StackViewDelegate { -- cgit v1.2.3 From a57da2f0cdd5e4b48936cf3d0973df04beab0cd9 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Mon, 7 Aug 2017 12:16:04 +0200 Subject: MiddlePanel scaling --- MiddlePanel.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'MiddlePanel.qml') diff --git a/MiddlePanel.qml b/MiddlePanel.qml index 1ffd3132..18568f28 100644 --- a/MiddlePanel.qml +++ b/MiddlePanel.qml @@ -29,6 +29,7 @@ import QtQml 2.0 import QtQuick 2.2 +// QtQuick.Controls 2.0 isn't stable enough yet. Needs more testing. //import QtQuick.Controls 2.0 import QtQuick.Controls 1.4 import QtQuick.Layouts 1.1 @@ -47,7 +48,7 @@ Rectangle { property string balanceText property string unlockedBalanceLabelText: qsTr("Unlocked Balance") + translationManager.emptyString property string unlockedBalanceText - property int minHeight: (appWindow.height > 800) ? appWindow.height : 800 + property int minHeight: (appWindow.height > 800) ? appWindow.height : 800 * scaleRatio // property int headerHeight: header.height property Transfer transferView: Transfer { } @@ -106,7 +107,7 @@ Rectangle { }, State { name: "Transfer" PropertyChanges { target: root; currentView: transferView } - PropertyChanges { target: mainFlickable; contentHeight: 1000 } + PropertyChanges { target: mainFlickable; contentHeight: 1000 * scaleRatio } }, State { name: "Receive" PropertyChanges { target: root; currentView: receiveView } @@ -126,7 +127,7 @@ Rectangle { }, State { name: "Settings" PropertyChanges { target: root; currentView: settingsView } - PropertyChanges { target: mainFlickable; contentHeight: 1200 } + PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio } }, State { name: "Mining" PropertyChanges { target: root; currentView: miningView } -- cgit v1.2.3 From 44079aab37432ba5a81f347c6eb1c3a899efbcb6 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Mon, 7 Aug 2017 12:22:49 +0200 Subject: android fix: release focus after scrolling --- MiddlePanel.qml | 5 +++++ main.qml | 10 ++++++++++ 2 files changed, 15 insertions(+) (limited to 'MiddlePanel.qml') diff --git a/MiddlePanel.qml b/MiddlePanel.qml index 18568f28..f8a1d2df 100644 --- a/MiddlePanel.qml +++ b/MiddlePanel.qml @@ -166,6 +166,11 @@ Rectangle { Layout.fillWidth: true Layout.fillHeight: true clip: true + + onFlickingChanged: { + releaseFocus(); + } + // Disabled scrollbars, gives crash on startup on windows // ScrollIndicator.vertical: ScrollIndicator { } // ScrollBar.vertical: ScrollBar { } // uncomment to test diff --git a/main.qml b/main.qml index b72f21ff..588ea539 100644 --- a/main.qml +++ b/main.qml @@ -1439,4 +1439,14 @@ ApplicationWindow { return false } + function releaseFocus() { + // Workaround to release focus from textfield when scrolling (https://bugreports.qt.io/browse/QTBUG-34867) + if(isAndroid) { + console.log("releasing focus") + middlePanel.focus = true + middlePanel.focus = false + } + + + } } -- cgit v1.2.3 From 2d357b6c120d925ac3b9209ab3c8feb05b918f94 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Thu, 2 Nov 2017 07:52:56 +0100 Subject: Keys page height fix --- MiddlePanel.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MiddlePanel.qml') diff --git a/MiddlePanel.qml b/MiddlePanel.qml index f8a1d2df..a008a62a 100644 --- a/MiddlePanel.qml +++ b/MiddlePanel.qml @@ -135,7 +135,7 @@ Rectangle { }, State { name: "Keys" PropertyChanges { target: root; currentView: keysView } - PropertyChanges { target: mainFlickable; contentHeight: minHeight } + PropertyChanges { target: mainFlickable; contentHeight: minHeight + 200 * scaleRatio } } ] -- cgit v1.2.3