Skip to content

Commit b3179a8

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 f67aba4 commit b3179a8

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
@@ -191,22 +191,6 @@ void ReceiveCoinsDialog::resizeEvent(QResizeEvent *event)
191191
columnResizingFixer->stretchColumnWidth(RecentRequestsTableModel::Message);
192192
}
193193

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