Skip to content

Commit

Permalink
Fixed tab color issues on dark mode macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjsmith committed May 17, 2022
1 parent 12668d9 commit 67ec1a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exespy/tab_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 67ec1a3

Please sign in to comment.