Skip to content

Commit d0cc1f6

Browse files
committed
qt: Disable toolbar when overlay is shown
1 parent e74cd20 commit d0cc1f6

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/qt/bitcoingui.cpp

Lines changed: 3 additions & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public Q_SLOTS:
3636
void toggleVisibility();
3737
void closeClicked();
3838

39+
Q_SIGNALS:
40+
void triggered(bool hidden);
41+
3942
protected:
4043
bool eventFilter(QObject * obj, QEvent * ev) override;
4144
bool event(QEvent* ev) override;

0 commit comments

Comments
 (0)