From 7b2e42ecc4bddb5504665d6932dc5ffdbd3b593e Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 25 Oct 2020 21:12:58 +0200 Subject: qt: Add WalletFrame::sizeHint This change makes the layout of a WalletFrame widget correct even without loaded wallets. --- src/qt/walletframe.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/qt/walletframe.cpp') diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index f16761d6b2..4a9b4a5c84 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 -#include #include -#include #include +#include +#include +#include +#include #include #include @@ -18,10 +19,11 @@ #include #include -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); -- cgit v1.2.3