Skip to content

Commit 6f12d1a

Browse files
committed
Merge d52bfc4 into merged_master (Bitcoin PR bitcoin-core/gui#30)
2 parents 27b8e0b + d52bfc4 commit 6f12d1a

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/qt/bitcoingui.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
112112
Q_EMIT consoleShown(rpcConsole);
113113
}
114114

115+
modalOverlay = new ModalOverlay(enableWallet, this->centralWidget());
116+
115117
// Accept D&D of URIs
116118
setAcceptDrops(true);
117119

@@ -201,7 +203,6 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
201203
openOptionsDialogWithTab(OptionsDialog::TAB_NETWORK);
202204
});
203205

204-
modalOverlay = new ModalOverlay(enableWallet, this->centralWidget());
205206
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
206207
connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
207208
#ifdef ENABLE_WALLET
@@ -238,6 +239,7 @@ BitcoinGUI::~BitcoinGUI()
238239
void BitcoinGUI::createActions()
239240
{
240241
QActionGroup *tabGroup = new QActionGroup(this);
242+
connect(modalOverlay, &ModalOverlay::triggered, tabGroup, &QActionGroup::setEnabled);
241243

242244
overviewAction = new QAction(platformStyle->SingleColorIcon(":/icons/overview"), tr("&Overview"), this);
243245
overviewAction->setStatusTip(tr("Show general overview of wallet"));

src/qt/modaloverlay.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ void ModalOverlay::showHide(bool hide, bool userRequested)
171171
if ( (layerIsVisible && !hide) || (!layerIsVisible && hide) || (!hide && userClosed && !userRequested))
172172
return;
173173

174+
Q_EMIT triggered(hide);
175+
174176
if (!isVisible() && !hide)
175177
setVisible(true);
176178

src/qt/modaloverlay.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,20 @@ class ModalOverlay : public QWidget
2525
explicit ModalOverlay(bool enable_wallet, QWidget *parent);
2626
~ModalOverlay();
2727

28-
public Q_SLOTS:
2928
void tipUpdate(int count, const QDateTime& blockDate, double nVerificationProgress);
3029
void setKnownBestHeight(int count, const QDateTime& blockDate);
3130

32-
void toggleVisibility();
3331
// will show or hide the modal layer
3432
void showHide(bool hide = false, bool userRequested = false);
35-
void closeClicked();
3633
bool isLayerVisible() const { return layerIsVisible; }
3734

35+
public Q_SLOTS:
36+
void toggleVisibility();
37+
void closeClicked();
38+
39+
Q_SIGNALS:
40+
void triggered(bool hidden);
41+
3842
protected:
3943
bool eventFilter(QObject * obj, QEvent * ev) override;
4044
bool event(QEvent* ev) override;

0 commit comments

Comments
 (0)