From 67ec1a30c5c18c0e3f77c3aa0bd7ea91fe41bcef Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 17 May 2022 13:21:32 -0400 Subject: [PATCH] Fixed tab color issues on dark mode macOS --- exespy/tab_view.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exespy/tab_view.py b/exespy/tab_view.py index ea99925..cffa7bd 100644 --- a/exespy/tab_view.py +++ b/exespy/tab_view.py @@ -108,6 +108,8 @@ def __init__(self, parent: QtWidgets.QMainWindow, *args, **kwargs): self.add_tab(entropy.EntropyView()) self.add_tab(virustotal.VirusTotalView()) + self.ORIGINAL_TAB_TEXT_COLOR = self.tabBar().tabTextColor(0) + # Disable all tabs except general for tab_name, tab in self.tabs.items(): if tab_name != general.GeneralView.NAME: @@ -184,7 +186,7 @@ def set_disabled(self, tab: str, disabled: bool): self.tabBar().setTabEnabled(self.indexOf(self.tabs[tab]), False) else: self.tabBar().setTabTextColor( - self.indexOf(self.tabs[tab]), QtGui.QColor(0, 0, 0) + self.indexOf(self.tabs[tab]), self.ORIGINAL_TAB_TEXT_COLOR ) self.tabBar().setTabEnabled(self.indexOf(self.tabs[tab]), True)