mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-11 09:42:17 +01: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user