Browse Source

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

master
Sander van Grieken 3 years ago
parent
commit
ff8a049525
  1. 26
      electrum/gui/qml/components/WalletMainView.qml
  2. 19
      electrum/gui/qml/components/main.qml

26
electrum/gui/qml/components/WalletMainView.qml

@ -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()
}
}
}

19
electrum/gui/qml/components/main.qml

@ -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

Loading…
Cancel
Save