Skip to content

Commit 7abcce9

Browse files
MarcoFalkePastaPastaPasta
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 #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 1ff7090 commit 7abcce9

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
@@ -194,22 +194,6 @@ void ReceiveCoinsDialog::resizeEvent(QResizeEvent *event)
194194
columnResizingFixer->stretchColumnWidth(RecentRequestsTableModel::Message);
195195
}
196196

197-
void ReceiveCoinsDialog::keyPressEvent(QKeyEvent *event)
198-
{
199-
if (event->key() == Qt::Key_Return)
200-
{
201-
// press return -> submit form
202-
if (ui->reqLabel->hasFocus() || ui->reqAmount->hasFocus() || ui->reqMessage->hasFocus())
203-
{
204-
event->ignore();
205-
on_receiveButton_clicked();
206-
return;
207-
}
208-
}
209-
210-
this->QDialog::keyPressEvent(event);
211-
}
212-
213197
QModelIndex ReceiveCoinsDialog::selectedRow()
214198
{
215199
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)