-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #176: Fix TxViewDelegate layout
af58f5b qt: Stop the effect of hidden widgets on the size of QStackedWidget (Hennadii Stepanov) f0d0479 qt: Fix TxViewDelegate layout (Hennadii Stepanov) d439921 qt: Add TransactionOverviewWidget class (Hennadii Stepanov) Pull request description: This change: - prevents overlapping date and amount strings - guaranties that "eye" sign at the end of the watch-only address/label is always visible Fix bitcoin/bitcoin#20826 Here are some screenshots with this PR with the _minimum available width_ of the transaction list widget:     ACKs for top commit: dooglus: ACK af58f5b. jarolrod: re-ACK af58f5b Tree-SHA512: 6dae682490ec50fa0335d220bc2d153fa3e6ed578f07c6353a3b180f8f6cf1c2f9e52ebd7b3076f51d7004d86bf5cca14e6b5db9cdf786e85a57a81eacbb4988
- Loading branch information
Showing
5 changed files
with
105 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) 2021 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef BITCOIN_QT_TRANSACTIONOVERVIEWWIDGET_H | ||
#define BITCOIN_QT_TRANSACTIONOVERVIEWWIDGET_H | ||
|
||
#include <qt/transactiontablemodel.h> | ||
|
||
#include <QListView> | ||
#include <QSize> | ||
#include <QSizePolicy> | ||
|
||
QT_BEGIN_NAMESPACE | ||
class QShowEvent; | ||
class QWidget; | ||
QT_END_NAMESPACE | ||
|
||
class TransactionOverviewWidget : public QListView | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit TransactionOverviewWidget(QWidget* parent = nullptr) : QListView(parent) {} | ||
|
||
QSize sizeHint() const override | ||
{ | ||
return {sizeHintForColumn(TransactionTableModel::ToAddress), QListView::sizeHint().height()}; | ||
} | ||
|
||
protected: | ||
void showEvent(QShowEvent* event) override | ||
{ | ||
Q_UNUSED(event); | ||
QSizePolicy sp = sizePolicy(); | ||
sp.setHorizontalPolicy(QSizePolicy::Minimum); | ||
setSizePolicy(sp); | ||
} | ||
}; | ||
|
||
#endif // BITCOIN_QT_TRANSACTIONOVERVIEWWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters