mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -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());
|
||||
}
|
||||
|
||||
setContextMenuPolicy(Qt::PreventContextMenu);
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
enableWallet = WalletModel::isWalletEnabled();
|
||||
#endif // ENABLE_WALLET
|
||||
|
@ -544,7 +546,6 @@ void BitcoinGUI::createToolBars()
|
|||
{
|
||||
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
|
||||
appToolBar = toolbar;
|
||||
toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
|
||||
toolbar->setMovable(false);
|
||||
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
toolbar->addAction(overviewAction);
|
||||
|
|
Loading…
Reference in a new issue