Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unreasonable default size of the main window without loaded wallets #116

Merged
merged 1 commit into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/qt/walletframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions src/qt/walletframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class WalletFrame : public QFrame

void showOutOfSyncWarning(bool fShow);

QSize sizeHint() const override { return m_size_hint; }

Q_SIGNALS:
/** Notify that the user has requested more information about the out-of-sync warning */
void requestedSyncWarningInfo();
Expand All @@ -59,6 +61,8 @@ class WalletFrame : public QFrame

const PlatformStyle *platformStyle;

const QSize m_size_hint;

public:
WalletView* currentWalletView() const;
WalletModel* currentWalletModel() const;
Expand Down