From d313b81ebcff5ed002c242192b9a0a93837c21d7 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 7 May 2020 15:39:27 -0400 Subject: [PATCH] add tabbar; fix resizable sidebar --- main.qml | 147 ++++++++++++++++++++++++++++++++++++++++++++-------- message.png | Bin 0 -> 630 bytes profile.png | Bin 0 -> 621 bytes wallet.png | Bin 0 -> 393 bytes 4 files changed, 124 insertions(+), 23 deletions(-) create mode 100644 message.png create mode 100644 profile.png create mode 100644 wallet.png diff --git a/main.qml b/main.qml index 0c15e569f0..d64b659a50 100644 --- a/main.qml +++ b/main.qml @@ -4,43 +4,144 @@ import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 ApplicationWindow { + id: applicationWindow width: 1024 height: 768 title: "JSON RPC Caller" visible: true - SplitView { + RowLayout { + id: rowLayout + width: parent.width + height: parent.height anchors.fill: parent +// spacing: 50 - Item { - width: 300 - height: parent.height - } + TabBar { + id: tabBar + width: 50 + height: width *2 + spacing + transformOrigin: Item.Top + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.fillHeight: true + anchors.top: parent.top + anchors.topMargin: 5 + spacing: 5 + Layout.fillWidth: true + Layout.minimumWidth: 50 + Layout.preferredWidth: 50 + Layout.maximumWidth: 50 + Layout.minimumHeight: 0 - Item { - width: parent.width/2 - height: parent.height + TabButton { + id: firstBtn + width: 50 + height: 50 + text: "" + transformOrigin: Item.Center + anchors.horizontalCenter: parent.horizontalCenter - ColumnLayout { - anchors.fill: parent - - RowLayout { - TextArea { id: callResult; Layout.fillWidth: true; text: logic.callResult; readOnly: true } - } - - RowLayout { - Label { text: "data2" } - TextField { id: txtData; Layout.fillWidth: true; text: "" } - Button { - text: "Send" - onClicked: logic.onSend(txtData.text) - enabled: txtData.text !== "" - } + Image { + id: image + anchors.fill: parent + fillMode: Image.PreserveAspectFit + source: "message.png" } } + TabButton { + id: secondBtn + width: 50 + height: 50 + text: "" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: firstBtn.bottom + anchors.topMargin: parent.spacing + + Image { + id: image1 + anchors.fill: parent + fillMode: Image.PreserveAspectFit + source: "wallet.png" + } + } + + TabButton { + id: thirdBtn + width: 50 + height: 50 + text: "" + anchors.topMargin: 0 + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: secondBtn.bottom + + Image { + id: image2 + anchors.fill: parent + fillMode: Image.PreserveAspectFit + source: "profile.png" + } + } } + SplitView { + Layout.fillHeight: true +// anchors.fill: parent +// width: parent.width + Layout.leftMargin: 0 + Layout.fillWidth: true + Layout.minimumWidth: 100 + Layout.preferredWidth: 200 +// Layout.preferredHeight: 100 + + Item { + width: 300 + height: parent.height + Layout.minimumWidth: 200 + + Button { + id: button + text: qsTr("TEST BUTTON") + } + } + + Item { + width: parent.width/2 + height: parent.height + + ColumnLayout { + anchors.fill: parent + + RowLayout { + Layout.fillHeight: true + TextArea { id: callResult; Layout.fillWidth: true; text: logic.callResult; readOnly: true } + } + + RowLayout { + Layout.bottomMargin: 20 + Layout.alignment: Qt.AlignLeft | Qt.AlignBottom + transformOrigin: Item.Bottom + Label { text: "data2" } + TextField { id: txtData; Layout.fillWidth: true; text: "" } + Button { + text: "Send" + onClicked: logic.onSend(txtData.text) + enabled: txtData.text !== "" + } + } + } + + } + + } } + } + + +/*##^## +Designer { + D{i:4;anchors_height:40;anchors_width:40}D{i:6;anchors_height:40;anchors_width:40} +} +##^##*/ diff --git a/message.png b/message.png new file mode 100644 index 0000000000000000000000000000000000000000..26d4702bce023af7181d4a5a0cbbbb33a17eafd1 GIT binary patch literal 630 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy#F1AIbUfi&gd&Z}47fu@L;1o;Is z2qa8cfB*ge^9>I5`{ygf_Xijhz`%IY)5S5Qg7NJQcCp!30<90NAI#)t z;{N{k{g=HeS4_Gub_V_Qlb?Qn8S^B*_QMYgCakhs`B699FV}(ZW!1Z-&tLqnTHI}X zQF3p|fxL~0ecWYIJ(W@iy&kOHWZf%?@?VCw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