commit 89dfd1cc2ce1bb005c58d3f2d8971e9a943917e5
parent f2b40c69fc5f31276eab668e36fed35c468dad3e
Author: ThomasV <thomasv@electrum.org>
Date: Mon, 16 Jul 2018 13:07:47 +0200
lightning: improve request tab layout
Diffstat:
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
@@ -914,19 +914,19 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
grid.setColumnStretch(3, 1)
self.receive_message_e = QLineEdit()
- grid.addWidget(QLabel(_('Description')), 1, 0)
- grid.addWidget(self.receive_message_e, 1, 1, 1, -1)
+ grid.addWidget(QLabel(_('Description')), 0, 0)
+ grid.addWidget(self.receive_message_e, 0, 1, 1, 4)
self.receive_message_e.textChanged.connect(self.update_receive_qr)
self.receive_amount_e = BTCAmountEdit(self.get_decimal_point)
- grid.addWidget(QLabel(_('Requested amount')), 2, 0)
- grid.addWidget(self.receive_amount_e, 2, 1)
+ grid.addWidget(QLabel(_('Requested amount')), 1, 0)
+ grid.addWidget(self.receive_amount_e, 1, 1)
self.receive_amount_e.textChanged.connect(self.update_receive_qr)
self.fiat_receive_e = AmountEdit(self.fx.get_currency if self.fx else '')
if not self.fx or not self.fx.is_enabled():
self.fiat_receive_e.setVisible(False)
- grid.addWidget(self.fiat_receive_e, 2, 2, Qt.AlignLeft)
+ grid.addWidget(self.fiat_receive_e, 1, 2, Qt.AlignLeft)
self.connect_fields(self, self.receive_amount_e, self.fiat_receive_e, None)
self.expires_combo = QComboBox()
@@ -939,26 +939,26 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
_('Expired requests have to be deleted manually from your list, in order to free the corresponding Bitcoin addresses.'),
_('The bitcoin address never expires and will always be part of this electrum wallet.'),
])
- grid.addWidget(HelpLabel(_('Request expires'), msg), 3, 0)
- grid.addWidget(self.expires_combo, 3, 1)
+ grid.addWidget(HelpLabel(_('Request expires'), msg), 2, 0)
+ grid.addWidget(self.expires_combo, 2, 1)
self.expires_label = QLineEdit('')
self.expires_label.setReadOnly(1)
self.expires_label.setFocusPolicy(Qt.NoFocus)
self.expires_label.hide()
- grid.addWidget(self.expires_label, 3, 1)
+ grid.addWidget(self.expires_label, 2, 1)
self.receive_type = QComboBox()
- self.receive_type.addItems([_('Bitcoin address'), _('Lightning')])
- grid.addWidget(QLabel(_('Type')), 4, 0)
- grid.addWidget(self.receive_type, 4, 1)
+ self.receive_type.addItems([_('On-chain'), _('Lightning')])
+ grid.addWidget(QLabel(_('Type')), 3, 0)
+ grid.addWidget(self.receive_type, 3, 1)
- self.save_request_button = QPushButton(_('Create'))
+ self.save_request_button = QPushButton(_('Create Request'))
self.save_request_button.clicked.connect(self.create_invoice)
self.receive_buttons = buttons = QHBoxLayout()
- buttons.addWidget(self.save_request_button)
buttons.addStretch(1)
- grid.addLayout(buttons, 4, 2, 1, 2)
+ buttons.addWidget(self.save_request_button)
+ grid.addLayout(buttons, 4, 3, 1, 2)
self.receive_address_e = ButtonsTextEdit()
self.receive_address_e.addCopyButton(self.app)
@@ -967,7 +967,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
self.receive_address_e.textChanged.connect(self.update_receive_address_styling)
self.receive_address_e.setFocusPolicy(Qt.ClickFocus)
- self.receive_qr = QRCodeWidget(fixedSize=200)
+ self.receive_qr = QRCodeWidget(fixedSize=230)
self.receive_qr.mouseReleaseEvent = lambda x: self.toggle_qr_window()
self.receive_qr.enterEvent = lambda x: self.app.setOverrideCursor(QCursor(Qt.PointingHandCursor))
self.receive_qr.leaveEvent = lambda x: self.app.setOverrideCursor(QCursor(Qt.ArrowCursor))
@@ -988,6 +988,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
hbox = QHBoxLayout()
hbox.addLayout(vbox_g)
+ hbox.addStretch()
hbox.addLayout(hbox_r)
w = QWidget()