mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
qt: Disable toolbar when overlay is shown
This commit is contained in:
parent
e74cd2083d
commit
d0cc1f6df7
3 changed files with 8 additions and 1 deletions
|
@ -112,6 +112,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||
Q_EMIT consoleShown(rpcConsole);
|
||||
}
|
||||
|
||||
modalOverlay = new ModalOverlay(enableWallet, this->centralWidget());
|
||||
|
||||
// Accept D&D of URIs
|
||||
setAcceptDrops(true);
|
||||
|
||||
|
@ -201,7 +203,6 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||
openOptionsDialogWithTab(OptionsDialog::TAB_NETWORK);
|
||||
});
|
||||
|
||||
modalOverlay = new ModalOverlay(enableWallet, this->centralWidget());
|
||||
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
|
||||
connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
|
||||
#ifdef ENABLE_WALLET
|
||||
|
@ -238,6 +239,7 @@ BitcoinGUI::~BitcoinGUI()
|
|||
void BitcoinGUI::createActions()
|
||||
{
|
||||
QActionGroup *tabGroup = new QActionGroup(this);
|
||||
connect(modalOverlay, &ModalOverlay::triggered, tabGroup, &QActionGroup::setEnabled);
|
||||
|
||||
overviewAction = new QAction(platformStyle->SingleColorIcon(":/icons/overview"), tr("&Overview"), this);
|
||||
overviewAction->setStatusTip(tr("Show general overview of wallet"));
|
||||
|
|
|
@ -171,6 +171,8 @@ void ModalOverlay::showHide(bool hide, bool userRequested)
|
|||
if ( (layerIsVisible && !hide) || (!layerIsVisible && hide) || (!hide && userClosed && !userRequested))
|
||||
return;
|
||||
|
||||
Q_EMIT triggered(hide);
|
||||
|
||||
if (!isVisible() && !hide)
|
||||
setVisible(true);
|
||||
|
||||
|
|
|
@ -36,6 +36,9 @@ public Q_SLOTS:
|
|||
void toggleVisibility();
|
||||
void closeClicked();
|
||||
|
||||
Q_SIGNALS:
|
||||
void triggered(bool hidden);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject * obj, QEvent * ev) override;
|
||||
bool event(QEvent* ev) override;
|
||||
|
|
Loading…
Add table
Reference in a new issue