From acf8d700a45d06ad965167479c4f53b9c72c7ca3 Mon Sep 17 00:00:00 2001 From: libfitz <8684928+libfitz@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:56:40 +0300 Subject: [PATCH] Disable the option to hide main toolbar --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index 3f882a3..7c76d30 100644 --- a/main.py +++ b/main.py @@ -229,6 +229,13 @@ class DockerGUI(QMainWindow): self.create_volume_action.setVisible(True) self.remove_volume_action.setVisible(True) + # override QMainWindow.createPopupMenu + def createPopupMenu(self): + filtered_menu = super(DockerGUI, self).createPopupMenu() + filtered_menu.removeAction(self.toolbar.toggleViewAction()) + + return filtered_menu + def update_visible_tabs(self, index): for i in range(self.tab_widget.count()): if i == index: