From 15251618617d19af5ecc87806df7ce9c21974ee5 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 8 May 2020 14:42:41 -0400 Subject: [PATCH 1/3] cool stuff --- main.qml | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/main.qml b/main.qml index 550a5c9449..c7fc974344 100644 --- a/main.qml +++ b/main.qml @@ -19,8 +19,10 @@ ApplicationWindow { TabBar { id: tabBar + y: 0 width: 50 height: width *2 + spacing + Layout.preferredHeight: 0 currentIndex: 0 topPadding: 57 rightPadding: 19 @@ -29,13 +31,16 @@ ApplicationWindow { Layout.alignment: Qt.AlignLeft | Qt.AlignTop Layout.fillHeight: true anchors.top: parent.top - anchors.topMargin: 5 spacing: 5 Layout.fillWidth: true Layout.minimumWidth: 80 Layout.preferredWidth: 80 Layout.maximumWidth: 80 Layout.minimumHeight: 0 + background: Rectangle { + color: "#00000000" + border.color: "#EEF2F5" + } TabButton { id: firstBtn @@ -127,13 +132,42 @@ ApplicationWindow { // Layout.preferredHeight: 100 Item { + id: element1 width: 300 height: parent.height Layout.minimumWidth: 200 - Button { - id: button - text: qsTr("TEST BUTTON") + Text { + id: element + x: 772 + text: qsTr("Chat") + anchors.top: parent.top + anchors.topMargin: 17 + font.bold: true + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 17 + } + + Rectangle { + id: rectangle + height: 36 + color: "#EEF2F5" + anchors.top: parent.top + anchors.topMargin: 59 + radius: 8 + anchors.right: parent.right + anchors.rightMargin: 55 + anchors.left: parent.left + anchors.leftMargin: 16 + + Text { + id: element2 + text: qsTr("Search") + anchors.left: parent.left + anchors.leftMargin: 32 + anchors.verticalCenter: parent.verticalCenter + font.pixelSize: 12 + } } } @@ -166,6 +200,7 @@ ApplicationWindow { } + } ColumnLayout { @@ -189,6 +224,7 @@ ApplicationWindow { /*##^## Designer { - D{i:0;formeditorZoom:1.5}D{i:8;anchors_height:40;anchors_width:40} + D{i:0;formeditorZoom:2}D{i:9;anchors_height:40;anchors_width:40}D{i:16;anchors_y:0} +D{i:17;anchors_width:200} } ##^##*/ From 966e665a9d63d1c22260fd89498f8d4f6c978670 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 8 May 2020 17:11:04 -0400 Subject: [PATCH 2/3] feat: add search bar --- img/search.svg | 3 +++ main.qml | 56 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 img/search.svg diff --git a/img/search.svg b/img/search.svg new file mode 100644 index 0000000000..7e2b291a0e --- /dev/null +++ b/img/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/main.qml b/main.qml index c7fc974344..83bde2960b 100644 --- a/main.qml +++ b/main.qml @@ -149,7 +149,7 @@ ApplicationWindow { } Rectangle { - id: rectangle + id: searchBox height: 36 color: "#EEF2F5" anchors.top: parent.top @@ -160,13 +160,58 @@ ApplicationWindow { anchors.left: parent.left anchors.leftMargin: 16 - Text { - id: element2 - text: qsTr("Search") + TextField { + id: searchText + placeholderText: qsTr("Search") anchors.left: parent.left anchors.leftMargin: 32 anchors.verticalCenter: parent.verticalCenter font.pixelSize: 12 + background: { + } + } + + Image { + id: image3 + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.verticalCenter: parent.verticalCenter + fillMode: Image.PreserveAspectFit + source: "img/search.svg" + } + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked : { + searchText.forceActiveFocus(Qt.MouseFocusReason) + } + } + } + + Rectangle { + id: addChat + width: 36 + height: 36 + color: "#4360DF" + radius: 50 + anchors.right: parent.right + anchors.rightMargin: 9 + anchors.top: parent.top + anchors.topMargin: 59 + + Text { + id: element3 + color: "#ffffff" + text: qsTr("+") + anchors.verticalCenterOffset: -1 + anchors.horizontalCenterOffset: 1 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + lineHeight: 1 + fontSizeMode: Text.FixedSize + font.bold: true + font.pixelSize: 28 } } } @@ -224,7 +269,6 @@ ApplicationWindow { /*##^## Designer { - D{i:0;formeditorZoom:2}D{i:9;anchors_height:40;anchors_width:40}D{i:16;anchors_y:0} -D{i:17;anchors_width:200} + D{i:9;anchors_height:40;anchors_width:40}D{i:16;anchors_y:0}D{i:20;anchors_height:100;anchors_width:100} } ##^##*/ From d09efbd39749a17ad426210425f03293ad0fe318 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 8 May 2020 17:16:08 -0400 Subject: [PATCH 3/3] feat: add browser btn --- main.qml | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/main.qml b/main.qml index 83bde2960b..bae8731011 100644 --- a/main.qml +++ b/main.qml @@ -43,7 +43,7 @@ ApplicationWindow { } TabButton { - id: firstBtn + id: chatBtn x: 0 width: 40 height: 40 @@ -67,13 +67,13 @@ ApplicationWindow { } TabButton { - id: secondBtn + id: walletBtn width: 40 height: 40 text: "" anchors.topMargin: 50 anchors.horizontalCenter: parent.horizontalCenter - anchors.top: firstBtn.top + anchors.top: chatBtn.top background: Rectangle { color: "#ECEFFC" opacity: parent.checked ? 1 : 0 @@ -90,13 +90,13 @@ ApplicationWindow { } TabButton { - id: thirdBtn + id: browserBtn width: 40 height: 40 text: "" anchors.topMargin: 50 anchors.horizontalCenter: parent.horizontalCenter - anchors.top: secondBtn.top + anchors.top: walletBtn.top background: Rectangle { color: "#ECEFFC" opacity: parent.checked ? 1 : 0 @@ -108,6 +108,29 @@ ApplicationWindow { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter fillMode: Image.PreserveAspectFit + source: parent.checked ? "img/compassActive.svg" : "img/compass.svg" + } + } + + TabButton { + id: profileBtn + width: 40 + height: 40 + text: "" + anchors.topMargin: 50 + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: browserBtn.top + background: Rectangle { + color: "#ECEFFC" + opacity: parent.checked ? 1 : 0 + radius: 50 + } + + Image { + id: image3 + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + fillMode: Image.PreserveAspectFit source: parent.checked ? "img/profileActive.svg" : "img/profile.svg" } } @@ -172,7 +195,7 @@ ApplicationWindow { } Image { - id: image3 + id: image4 anchors.left: parent.left anchors.leftMargin: 10 anchors.verticalCenter: parent.verticalCenter @@ -269,6 +292,6 @@ ApplicationWindow { /*##^## Designer { - D{i:9;anchors_height:40;anchors_width:40}D{i:16;anchors_y:0}D{i:20;anchors_height:100;anchors_width:100} + D{i:9;anchors_height:40;anchors_width:40}D{i:19;anchors_y:0}D{i:23;anchors_height:100;anchors_width:100} } ##^##*/