Browse Source

ui: Better tab order in send coins entry

Pressing <tab> after entering a label now brings the focus to the
address entry, instead of the row of buttons. In my experience this
is more useful, as I usually want to paste an address after
entering the label.

The buttons are mostly useless anyway:

- Choosing a previously used address should be discouraged

- When I'm already using the keyboard the 'paste address' button is
useless - just use the Ctrl-V. Maybe it would be an idea to remove it
completely

- I usually don't want to remove the entry I'm typing now! So makes
sense to have it at the end of the tab chain.
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
340bff34b7
  1. 7
      src/qt/sendcoinsentry.cpp

7
src/qt/sendcoinsentry.cpp

@ -155,11 +155,12 @@ SendCoinsRecipient SendCoinsEntry::getValue()
QWidget *SendCoinsEntry::setupTabChain(QWidget *prev) QWidget *SendCoinsEntry::setupTabChain(QWidget *prev)
{ {
QWidget::setTabOrder(prev, ui->payTo); QWidget::setTabOrder(prev, ui->payTo);
QWidget::setTabOrder(ui->payTo, ui->addressBookButton); QWidget::setTabOrder(ui->payTo, ui->addAsLabel);
QWidget *w = ui->payAmount->setupTabChain(ui->addAsLabel);
QWidget::setTabOrder(w, ui->addressBookButton);
QWidget::setTabOrder(ui->addressBookButton, ui->pasteButton); QWidget::setTabOrder(ui->addressBookButton, ui->pasteButton);
QWidget::setTabOrder(ui->pasteButton, ui->deleteButton); QWidget::setTabOrder(ui->pasteButton, ui->deleteButton);
QWidget::setTabOrder(ui->deleteButton, ui->addAsLabel); return ui->deleteButton;
return ui->payAmount->setupTabChain(ui->addAsLabel);
} }
void SendCoinsEntry::setValue(const SendCoinsRecipient &value) void SendCoinsEntry::setValue(const SendCoinsRecipient &value)

Loading…
Cancel
Save