- changed the status bar label to have an icon instead of text

- added a label in status bar that will toggle the Preferences tab
- made some changes such that that the label in status bar for toggling the Preferences Tab will be updated in various cases of closing the tab
This commit is contained in:
Marius Stanciu
2020-06-01 23:09:15 +03:00
committed by Marius
parent cb5a20fda6
commit 0f04eb1215
10 changed files with 63 additions and 5 deletions

View File

@@ -2231,6 +2231,24 @@ class FCDetachableTab2(FCDetachableTab):
def __init__(self, protect=None, protect_by_name=None, parent=None):
super(FCDetachableTab2, self).__init__(protect=protect, protect_by_name=protect_by_name, parent=parent)
try:
self.tabBar.onCloseTabSignal.disconnect()
except TypeError:
pass
self.tabBar.onCloseTabSignal.connect(self.on_closetab_middle_button)
def on_closetab_middle_button(self, current_index):
"""
:param current_index:
:return:
"""
# if tab is protected don't delete it
if self.tabBar.tabButton(current_index, QtWidgets.QTabBar.RightSide) is not None:
self.closeTab(current_index)
def closeTab(self, currentIndex):
"""
Slot connected to the tabCloseRequested signal