From 6ef9329db8681726eb2107774d65d93513ac4c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ka=C5=A1e?= Date: Thu, 12 Dec 2024 17:51:23 +0100 Subject: [PATCH] MacOS Support (#638) Co-authored-by: Martin Kase --- gui.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gui.py b/gui.py index bdae6c6..fc56e2a 100644 --- a/gui.py +++ b/gui.py @@ -2044,17 +2044,16 @@ class GUIManager: 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": + # 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 + # 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) - # add padding to the tab names - style.configure("TNotebook.Tab", padding=[8, 4]) - # remove Checkbutton.focus dotted line from checkbuttons - if theme != "classic": + # remove Checkbutton.focus dotted line from checkbuttons style.configure("TCheckbutton", padding=0) original = style.layout("TCheckbutton") sublayout = original[0][1]["children"]