1
0

qml swap send and receive buttons, move menu button to bottom button group

This commit is contained in:
Sander van Grieken
2023-01-17 16:32:40 +01:00
parent d13c74eb0d
commit ff8a049525
2 changed files with 27 additions and 18 deletions

View File

@@ -160,11 +160,13 @@ Item {
spacing: 0
FlatButton {
Layout.fillWidth: true
Layout.preferredWidth: 1
icon.source: '../../icons/tab_send.png'
text: qsTr('Send')
onClicked: openSendDialog()
Layout.fillWidth: false
Layout.preferredWidth: implicitHeight
text: qsTr('≡')
onClicked: {
mainView.menu.open()
mainView.menu.y = mainView.height - mainView.menu.height
}
}
Rectangle {
Layout.fillWidth: false
@@ -183,6 +185,20 @@ Item {
dialog.open()
}
}
Rectangle {
Layout.fillWidth: false
Layout.preferredWidth: 2
Layout.preferredHeight: parent.height * 2/3
Layout.alignment: Qt.AlignVCenter
color: constants.darkerBackground
}
FlatButton {
Layout.fillWidth: true
Layout.preferredWidth: 1
icon.source: '../../icons/tab_send.png'
text: qsTr('Send')
onClicked: openSendDialog()
}
}
}

View File

@@ -36,32 +36,25 @@ ApplicationWindow
ColumnLayout {
spacing: 0
width: parent.width
height: toolbar.height
RowLayout {
id: toolbarTopLayout
Layout.fillWidth: true
Layout.rightMargin: constants.paddingMedium
Layout.alignment: Qt.AlignVCenter
ToolButton {
id: menuButton
enabled: stack.currentItem && stack.currentItem.menu
? stack.currentItem.menu.count > 0
: false
text: enabled ? qsTr("≡") : ''
font.pixelSize: constants.fontSizeXLarge
onClicked: {
stack.currentItem.menu.open()
stack.currentItem.menu.y = toolbarTopLayout.height
}
Item {
Layout.preferredWidth: constants.paddingXLarge
Layout.preferredHeight: 1
}
Label {
Layout.preferredHeight: Math.max(implicitHeight, toolbarTopLayout.height)
text: stack.currentItem.title
elide: Label.ElideRight
horizontalAlignment: Qt.AlignHCenter
// horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
Layout.fillWidth: true
font.pixelSize: constants.fontSizeMedium