Skip to content

Commit ca30d34

Browse files
author
MarcoFalke
committed
Merge bitcoin-core/gui#39: Add visual accenting for the 'Create new receiving 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
2 parents 5edef20 + 4ec49f8 commit ca30d34

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

src/qt/forms/receivecoinsdialog.ui

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@
114114
<iconset resource="../bitcoin.qrc">
115115
<normaloff>:/icons/receiving_addresses</normaloff>:/icons/receiving_addresses</iconset>
116116
</property>
117+
<property name="autoDefault">
118+
<bool>false</bool>
119+
</property>
120+
<property name="default">
121+
<bool>true</bool>
122+
</property>
117123
</widget>
118124
</item>
119125
<item>

src/qt/receivecoinsdialog.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -242,22 +242,6 @@ void ReceiveCoinsDialog::resizeEvent(QResizeEvent *event)
242242
columnResizingFixer->stretchColumnWidth(RecentRequestsTableModel::Message);
243243
}
244244

245-
void ReceiveCoinsDialog::keyPressEvent(QKeyEvent *event)
246-
{
247-
if (event->key() == Qt::Key_Return)
248-
{
249-
// press return -> submit form
250-
if (ui->reqLabel->hasFocus() || ui->reqAmount->hasFocus() || ui->reqMessage->hasFocus())
251-
{
252-
event->ignore();
253-
on_receiveButton_clicked();
254-
return;
255-
}
256-
}
257-
258-
this->QDialog::keyPressEvent(event);
259-
}
260-
261245
QModelIndex ReceiveCoinsDialog::selectedRow()
262246
{
263247
if(!model || !model->getRecentRequestsTableModel() || !ui->recentRequestsView->selectionModel())

src/qt/receivecoinsdialog.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ public Q_SLOTS:
4949
void reject() override;
5050
void accept() override;
5151

52-
protected:
53-
virtual void keyPressEvent(QKeyEvent *event) override;
54-
5552
private:
5653
Ui::ReceiveCoinsDialog *ui;
5754
GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer;

0 commit comments

Comments
 (0)