2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2020-05-11 21:24:08 +00:00
|
|
|
import "../imports"
|
2020-06-23 18:59:16 +00:00
|
|
|
import "../shared"
|
2020-05-13 17:27:06 +00:00
|
|
|
import "./AppLayouts"
|
2020-05-11 21:24:08 +00:00
|
|
|
|
|
|
|
RowLayout {
|
2020-06-23 20:49:04 +00:00
|
|
|
property var appSettings
|
|
|
|
|
2020-05-11 21:24:08 +00:00
|
|
|
id: rowLayout
|
2020-05-13 14:40:51 +00:00
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2020-05-11 21:24:08 +00:00
|
|
|
|
|
|
|
TabBar {
|
|
|
|
id: tabBar
|
2020-06-23 18:59:16 +00:00
|
|
|
width: 78
|
2020-05-13 14:40:51 +00:00
|
|
|
Layout.maximumWidth: 80
|
|
|
|
Layout.preferredWidth: 80
|
|
|
|
Layout.minimumWidth: 80
|
2020-05-11 21:24:08 +00:00
|
|
|
currentIndex: 0
|
|
|
|
topPadding: 57
|
|
|
|
rightPadding: 19
|
|
|
|
leftPadding: 19
|
|
|
|
transformOrigin: Item.Top
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
|
|
|
spacing: 5
|
|
|
|
background: Rectangle {
|
|
|
|
color: "#00000000"
|
2020-07-13 18:45:54 +00:00
|
|
|
border.color: Style.current.border
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: chatBtn
|
|
|
|
x: 0
|
|
|
|
width: 40
|
|
|
|
height: 40
|
|
|
|
text: ""
|
|
|
|
padding: 0
|
|
|
|
transformOrigin: Item.Center
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
background: Rectangle {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-11 21:24:08 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-11 21:24:08 +00:00
|
|
|
id: image
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: parent.checked ? "img/messageActive.svg" : "img/message.svg"
|
|
|
|
}
|
2020-07-22 19:05:13 +00:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
visible: !parent.checked && chatsModel.unreadMessagesCount > 0
|
|
|
|
anchors.top: image.top
|
|
|
|
anchors.left: image.right
|
|
|
|
anchors.leftMargin: -10
|
|
|
|
anchors.topMargin: -5
|
|
|
|
radius: 9
|
|
|
|
color: Style.current.blue
|
2020-07-22 19:21:44 +00:00
|
|
|
width: chatsModel.unreadMessagesCount < 10 ? 18 : childrenRect.width + 10
|
|
|
|
height: 18
|
2020-07-22 19:05:13 +00:00
|
|
|
Text {
|
2020-07-22 19:21:44 +00:00
|
|
|
font.pixelSize: chatsModel.unreadMessagesCount > 99 ? 10 : 12
|
2020-07-22 19:05:13 +00:00
|
|
|
color: Style.current.white
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: chatsModel.unreadMessagesCount
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: walletBtn
|
2020-06-26 14:08:08 +00:00
|
|
|
enabled: isExperimental === "1"
|
|
|
|
visible: this.enabled
|
2020-05-11 21:24:08 +00:00
|
|
|
width: 40
|
2020-06-26 14:08:08 +00:00
|
|
|
height: this.enabled ? 40 : 0
|
2020-05-11 21:24:08 +00:00
|
|
|
text: ""
|
2020-06-26 14:08:08 +00:00
|
|
|
anchors.topMargin: this.enabled ? 50 : 0
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: chatBtn.top
|
|
|
|
background: Rectangle {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-11 21:24:08 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-11 21:24:08 +00:00
|
|
|
id: image1
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: parent.checked ? "img/walletActive.svg" : "img/wallet.svg"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: browserBtn
|
2020-06-26 14:08:08 +00:00
|
|
|
enabled: isExperimental === "1"
|
2020-06-18 12:03:11 +00:00
|
|
|
visible: this.enabled
|
2020-05-11 21:24:08 +00:00
|
|
|
width: 40
|
2020-06-18 12:03:11 +00:00
|
|
|
height: this.enabled ? 40 : 0
|
2020-05-11 21:24:08 +00:00
|
|
|
text: ""
|
2020-06-18 12:03:11 +00:00
|
|
|
anchors.topMargin: this.enabled ? 50 : 0
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: walletBtn.top
|
|
|
|
background: Rectangle {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-11 21:24:08 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-11 21:24:08 +00:00
|
|
|
id: image2
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-11 21:24:08 +00:00
|
|
|
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 {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-11 21:24:08 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-11 21:24:08 +00:00
|
|
|
id: image3
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-11 21:24:08 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: parent.checked ? "img/profileActive.svg" : "img/profile.svg"
|
|
|
|
}
|
|
|
|
}
|
2020-05-15 21:10:00 +00:00
|
|
|
|
|
|
|
TabButton {
|
|
|
|
id: nodeBtn
|
2020-06-26 14:08:08 +00:00
|
|
|
enabled: isExperimental === "1"
|
2020-06-18 12:03:11 +00:00
|
|
|
visible: this.enabled
|
2020-05-15 21:10:00 +00:00
|
|
|
width: 40
|
2020-06-18 12:03:11 +00:00
|
|
|
height: this.enabled ? 40 : 0
|
2020-05-15 21:10:00 +00:00
|
|
|
text: ""
|
2020-06-18 12:03:11 +00:00
|
|
|
anchors.topMargin: this.enabled ? 50 : 0
|
2020-05-15 21:10:00 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: profileBtn.top
|
|
|
|
background: Rectangle {
|
2020-07-13 18:45:54 +00:00
|
|
|
color: Style.current.secondaryBackground
|
2020-05-15 21:10:00 +00:00
|
|
|
opacity: parent.checked ? 1 : 0
|
|
|
|
radius: 50
|
|
|
|
}
|
|
|
|
|
2020-06-23 18:59:16 +00:00
|
|
|
SVGImage {
|
2020-05-15 21:10:00 +00:00
|
|
|
id: image4
|
2020-06-23 18:59:16 +00:00
|
|
|
height: 24
|
|
|
|
width: 24
|
2020-05-15 21:10:00 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2020-06-23 18:59:16 +00:00
|
|
|
source: parent.checked ? "img/nodeActive.svg" : "img/node.svg"
|
2020-05-15 21:10:00 +00:00
|
|
|
}
|
|
|
|
}
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StackLayout {
|
2020-05-13 14:40:51 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
2020-05-11 21:24:08 +00:00
|
|
|
currentIndex: tabBar.currentIndex
|
|
|
|
|
2020-05-13 17:27:06 +00:00
|
|
|
ChatLayout {
|
|
|
|
id: chatLayoutContainer
|
2020-05-11 21:24:08 +00:00
|
|
|
Layout.fillWidth: true
|
2020-05-13 17:27:06 +00:00
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
2020-06-23 20:49:04 +00:00
|
|
|
appSettings: rowLayout.appSettings
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
2020-05-13 18:17:18 +00:00
|
|
|
|
|
|
|
WalletLayout {
|
|
|
|
id: walletLayoutContainer
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
2020-06-23 20:49:04 +00:00
|
|
|
appSettings: rowLayout.appSettings
|
2020-05-13 18:17:18 +00:00
|
|
|
}
|
2020-05-15 21:10:00 +00:00
|
|
|
|
2020-05-19 19:44:45 +00:00
|
|
|
BrowserLayout {
|
|
|
|
id: browserLayoutContainer
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
2020-05-15 21:10:00 +00:00
|
|
|
}
|
|
|
|
|
2020-05-19 19:44:45 +00:00
|
|
|
ProfileLayout {
|
|
|
|
id: profileLayoutContainer
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
2020-06-23 20:49:04 +00:00
|
|
|
appSettings: rowLayout.appSettings
|
2020-05-15 21:10:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
NodeLayout {
|
|
|
|
id: nodeLayoutContainer
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
2020-05-13 17:27:06 +00:00
|
|
|
D{i:0;formeditorZoom:0.33000001311302185;height:770;width:1232}
|
2020-05-11 21:24:08 +00:00
|
|
|
}
|
|
|
|
##^##*/
|