Skip to content

Commit 1fc5ad0

Browse files
MarcoFalkegades
MarcoFalke
authored andcommitted
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 dashpay#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
1 parent 649c425 commit 1fc5ad0

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

src/qt/forms/receivecoinsdialog.ui

+6
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@
110110
<property name="text">
111111
<string>&amp;Request payment</string>
112112
</property>
113+
<property name="autoDefault">
114+
<bool>false</bool>
115+
</property>
116+
<property name="default">
117+
<bool>true</bool>
118+
</property>
113119
</widget>
114120
</item>
115121
<item>

src/qt/receivecoinsdialog.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -202,22 +202,6 @@ void ReceiveCoinsDialog::resizeEvent(QResizeEvent *event)
202202
columnResizingFixer->stretchColumnWidth(RecentRequestsTableModel::Message);
203203
}
204204

205-
void ReceiveCoinsDialog::keyPressEvent(QKeyEvent *event)
206-
{
207-
if (event->key() == Qt::Key_Return)
208-
{
209-
// press return -> submit form
210-
if (ui->reqLabel->hasFocus() || ui->reqAmount->hasFocus() || ui->reqMessage->hasFocus())
211-
{
212-
event->ignore();
213-
on_receiveButton_clicked();
214-
return;
215-
}
216-
}
217-
218-
this->QDialog::keyPressEvent(event);
219-
}
220-
221205
QModelIndex ReceiveCoinsDialog::selectedRow()
222206
{
223207
if(!model || !model->getRecentRequestsTableModel() || !ui->recentRequestsView->selectionModel())

src/qt/receivecoinsdialog.h

-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public Q_SLOTS:
4848
void reject() override;
4949
void accept() override;
5050

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

0 commit comments

Comments
 (0)