From 98a8f79e992f502fc3208ad66d6a3bde6d70c54f Mon Sep 17 00:00:00 2001 From: Martin Kase Date: Tue, 10 Dec 2024 10:43:30 +0100 Subject: [PATCH 1/3] MacOS Fix --- gui.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui.py b/gui.py index bdae6c64..cab4d475 100644 --- a/gui.py +++ b/gui.py @@ -2046,7 +2046,7 @@ def __init__(self, twitch: Twitch): ) # remove Notebook.focus from the Notebook.Tab layout tree to avoid an ugly dotted line # on tab selection. We fold the Notebook.focus children into Notebook.padding children. - if theme != "classic": + if theme != "classic" and sys.platform != "darwin": # Skip on macOS original = style.layout("TNotebook.Tab") sublayout = original[0][1]["children"][0][1] sublayout["children"] = sublayout["children"][0][1]["children"] @@ -2054,7 +2054,7 @@ def __init__(self, twitch: Twitch): # add padding to the tab names style.configure("TNotebook.Tab", padding=[8, 4]) # remove Checkbutton.focus dotted line from checkbuttons - if theme != "classic": + if theme != "classic" and sys.platform != "darwin": # Skip on macOS style.configure("TCheckbutton", padding=0) original = style.layout("TCheckbutton") sublayout = original[0][1]["children"] @@ -2264,7 +2264,7 @@ def save(self, *, force: bool = False) -> None: def grab_attention(self, *, sound: bool = True): self.tray.restore() self._root.focus_force() - if sound: + if (sound): self._root.bell() def set_games(self, games: set[Game]) -> None: From e5ee6ff8c15e3bdb0aab1ba73fa4c08e90bcd51d Mon Sep 17 00:00:00 2001 From: Martin Kase Date: Wed, 11 Dec 2024 09:55:09 +0100 Subject: [PATCH 2/3] MacOS Fix --- gui.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gui.py b/gui.py index cab4d475..b7b230bc 100644 --- a/gui.py +++ b/gui.py @@ -2053,8 +2053,14 @@ def __init__(self, twitch: Twitch): style.layout("TNotebook.Tab", original) # add padding to the tab names style.configure("TNotebook.Tab", padding=[8, 4]) - # remove Checkbutton.focus dotted line from checkbuttons - if theme != "classic" and sys.platform != "darwin": # Skip on macOS + if theme != "classic" and sys.platform != "darwin": # Skip these for classic theme or macOS + # remove Notebook.focus from the Notebook.Tab layout tree to avoid an ugly dotted line + # on tab selection. We fold the Notebook.focus children into Notebook.padding children. + original = style.layout("TNotebook.Tab") + sublayout = original[0][1]["children"][0][1] + sublayout["children"] = sublayout["children"][0][1]["children"] + style.layout("TNotebook.Tab", original) + # remove Checkbutton.focus dotted line from checkbuttons style.configure("TCheckbutton", padding=0) original = style.layout("TCheckbutton") sublayout = original[0][1]["children"] @@ -2264,7 +2270,7 @@ def save(self, *, force: bool = False) -> None: def grab_attention(self, *, sound: bool = True): self.tray.restore() self._root.focus_force() - if (sound): + if sound: self._root.bell() def set_games(self, games: set[Game]) -> None: From d99368976046d98666f62a623e7236ce678850db Mon Sep 17 00:00:00 2001 From: Martin Kase Date: Thu, 12 Dec 2024 12:04:11 +0100 Subject: [PATCH 3/3] MacOS Fix --- gui.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gui.py b/gui.py index b7b230bc..fc56e2a2 100644 --- a/gui.py +++ b/gui.py @@ -2044,13 +2044,6 @@ def __init__(self, twitch: Twitch): foreground=self._fixed_map("foreground"), background=self._fixed_map("background"), ) - # remove Notebook.focus from the Notebook.Tab layout tree to avoid an ugly dotted line - # on tab selection. We fold the Notebook.focus children into Notebook.padding children. - if theme != "classic" and sys.platform != "darwin": # Skip on macOS - original = style.layout("TNotebook.Tab") - sublayout = original[0][1]["children"][0][1] - sublayout["children"] = sublayout["children"][0][1]["children"] - style.layout("TNotebook.Tab", original) # add padding to the tab names style.configure("TNotebook.Tab", padding=[8, 4]) if theme != "classic" and sys.platform != "darwin": # Skip these for classic theme or macOS