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