Skip to content

Commit

Permalink
Merge bitcoin-core/gui#39: Add visual accenting for the 'Create new r…
Browse files Browse the repository at this point in the history
…eceiving address' button

4ec49f8 qt: Leverage the default "Create new receiving address" button (Hennadii Stepanov)
4227a8e qt: Make "Create new receiving address" default unconditionally (Hennadii Stepanov)

Pull request description:

  Fix #24

  The first commit:
  - visual improvement with no behavior change

  The second commit:
  - removes a bunch of LOCs
  - slightly change behavior and makes it standard

  With this PR:
  ![DeepinScreenshot_select-area_20200721213040](https://user-images.githubusercontent.com/32963518/88093294-7b2a6700-cb9a-11ea-89a2-a0e2678056a7.png)

ACKs for top commit:
  Saibato:
    Concept tACK  bitcoin-core/gui@4227a8e bitcoin-core/gui@4ec49f8
  promag:
    Tested ACK 4ec49f8 on macos.

Tree-SHA512: 3403d5ee96ec139491c7e23b24a24d9239fe55c58d99cbd4cd13bc877f76f992ed011c09e2af35b2a63be1a2371b95f6ac719325396dcc8333cf3eb7fa2e3d2c
  • Loading branch information
MarcoFalke authored and PastaPastaPasta committed Jul 1, 2021
1 parent 1988592 commit fe2992e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
6 changes: 6 additions & 0 deletions src/qt/forms/receivecoinsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@
<property name="text">
<string>&amp;Request payment</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item>
Expand Down
16 changes: 0 additions & 16 deletions src/qt/receivecoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,22 +191,6 @@ void ReceiveCoinsDialog::resizeEvent(QResizeEvent *event)
columnResizingFixer->stretchColumnWidth(RecentRequestsTableModel::Message);
}

void ReceiveCoinsDialog::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Return)
{
// press return -> submit form
if (ui->reqLabel->hasFocus() || ui->reqAmount->hasFocus() || ui->reqMessage->hasFocus())
{
event->ignore();
on_receiveButton_clicked();
return;
}
}

this->QDialog::keyPressEvent(event);
}

QModelIndex ReceiveCoinsDialog::selectedRow()
{
if(!model || !model->getRecentRequestsTableModel() || !ui->recentRequestsView->selectionModel())
Expand Down
3 changes: 0 additions & 3 deletions src/qt/receivecoinsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public Q_SLOTS:
void reject() override;
void accept() override;

protected:
virtual void keyPressEvent(QKeyEvent *event) override;

private:
Ui::ReceiveCoinsDialog *ui;
GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer;
Expand Down

0 comments on commit fe2992e

Please sign in to comment.