aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletframe.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <[email protected]>2020-10-25 21:12:58 +0200
committerHennadii Stepanov <[email protected]>2020-10-25 21:17:18 +0200
commit7b2e42ecc4bddb5504665d6932dc5ffdbd3b593e (patch)
tree6455e0041a9d7da871395b8cc3a357c9b9df53e4 /src/qt/walletframe.cpp
parentMerge bitcoin-core/gui#43: bugfix: Call setWalletActionsEnabled(true) only fo... (diff)
downloaddiscoin-7b2e42ecc4bddb5504665d6932dc5ffdbd3b593e.tar.xz
discoin-7b2e42ecc4bddb5504665d6932dc5ffdbd3b593e.zip
qt: Add WalletFrame::sizeHint
This change makes the layout of a WalletFrame widget correct even without loaded wallets.
Diffstat (limited to 'src/qt/walletframe.cpp')
-rw-r--r--src/qt/walletframe.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp
index f16761d6b..4a9b4a5c8 100644
--- a/src/qt/walletframe.cpp
+++ b/src/qt/walletframe.cpp
@@ -2,12 +2,13 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <qt/createwalletdialog.h>
-#include <qt/walletcontroller.h>
#include <qt/walletframe.h>
-#include <qt/walletmodel.h>
#include <qt/bitcoingui.h>
+#include <qt/createwalletdialog.h>
+#include <qt/overviewpage.h>
+#include <qt/walletcontroller.h>
+#include <qt/walletmodel.h>
#include <qt/walletview.h>
#include <cassert>
@@ -18,10 +19,11 @@
#include <QPushButton>
#include <QVBoxLayout>
-WalletFrame::WalletFrame(const PlatformStyle *_platformStyle, BitcoinGUI *_gui) :
- QFrame(_gui),
- gui(_gui),
- platformStyle(_platformStyle)
+WalletFrame::WalletFrame(const PlatformStyle* _platformStyle, BitcoinGUI* _gui)
+ : QFrame(_gui),
+ gui(_gui),
+ platformStyle(_platformStyle),
+ m_size_hint(OverviewPage{platformStyle, nullptr}.sizeHint())
{
// Leave HBox hook for adding a list view later
QHBoxLayout *walletFrameLayout = new QHBoxLayout(this);