uiux: introduce StatusChatCommandsPopup component

This commit is contained in:
Pascal Precht 2020-09-29 10:21:49 +02:00 committed by Iuri Matias
parent bd63ae6bab
commit dcc0a1d321
3 changed files with 77 additions and 12 deletions

View File

@ -3,7 +3,6 @@ import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "../../../../../imports"
import "../../../../../shared"
import "../../../../../shared/status"
Popup {
id: root
@ -53,13 +52,12 @@ Popup {
padding: Style.current.halfPadding
spacing: Style.current.halfPadding
StatusChatCommandButton {
ChatCommandButton {
iconColor: Style.current.purple
iconSource: "../../../../img/send.svg"
//% "Send transaction"
text: qsTrId("send-transaction")
icon.color: Style.current.purple
icon.name: "send"
icon.width: 16
icon.height: 18
onClicked: function () {
chatCommandModal.sendChatCommand = root.requestAddressForTransaction
chatCommandModal.isRequested = false
@ -80,14 +78,12 @@ Popup {
}
StatusChatCommandButton {
ChatCommandButton {
iconColor: Style.current.orange
iconSource: "../../../../img/send.svg"
rotatedImage: true
//% "Request transaction"
text: qsTrId("request-transaction")
icon.color: Style.current.orange
icon.name: "send"
icon.width: 16
icon.height: 18
iconRotation: 180
onClicked: function () {
chatCommandModal.sendChatCommand = root.requestTransaction
chatCommandModal.isRequested = true

View File

@ -0,0 +1,68 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "../../imports"
import "../../shared"
Popup {
id: root
width: buttonRow.width
height: buttonRow.height
padding: 0
margins: 0
signal sendTransactionCommandButtonClicked()
signal receiveTransactionCommandButtonClicked()
background: Rectangle {
color: Style.current.background
radius: Style.current.radius
border.width: 0
layer.enabled: true
layer.effect: DropShadow {
verticalOffset: 3
radius: 8
samples: 15
fast: true
cached: true
color: "#22000000"
}
}
Row {
id: buttonRow
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: parent.top
anchors.topMargin: 0
padding: Style.current.halfPadding
spacing: Style.current.halfPadding
StatusChatCommandButton {
//% "Send transaction"
text: qsTrId("send-transaction")
icon.color: Style.current.purple
icon.name: "send"
icon.width: 16
icon.height: 18
onClicked: function () {
root.sendTransactionCommandButtonClicked()
}
}
StatusChatCommandButton {
//% "Request transaction"
text: qsTrId("request-transaction")
icon.color: Style.current.orange
icon.name: "send"
icon.width: 16
icon.height: 18
iconRotation: 180
onClicked: function () {
root.sendTransactionCommandButtonClicked()
}
}
}
}

View File

@ -1,5 +1,6 @@
StatusButton 1.0 StatusButton.qml
StatusChatCommandButton 1.0 StatusChatCommandButton.qml
StatusChatCommandPopup 1.0 StatusChatCommandPopup.qml
StatusChatInfo 1.0 StatusChatInfo.qml
StatusChatInfoButton 1.0 StatusChatInfoButton.qml
StatusIconButton 1.0 StatusIconButton.qml