mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
qt: Prevent the main window popup menu
By default, a popup menu contains checkable entries for the toolbars and dock widgets present in the main window. This allows users to accidentally hide the toolbar.
This commit is contained in:
parent
1e7dd584a5
commit
ca5bd1c8e5
1 changed files with 2 additions and 1 deletions
|
@ -88,6 +88,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
||||||
move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
|
move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setContextMenuPolicy(Qt::PreventContextMenu);
|
||||||
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
enableWallet = WalletModel::isWalletEnabled();
|
enableWallet = WalletModel::isWalletEnabled();
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
|
@ -544,7 +546,6 @@ void BitcoinGUI::createToolBars()
|
||||||
{
|
{
|
||||||
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
|
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
|
||||||
appToolBar = toolbar;
|
appToolBar = toolbar;
|
||||||
toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
|
|
||||||
toolbar->setMovable(false);
|
toolbar->setMovable(false);
|
||||||
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||||
toolbar->addAction(overviewAction);
|
toolbar->addAction(overviewAction);
|
||||||
|
|
Loading…
Add table
Reference in a new issue