MacOS Support (#638)
Co-authored-by: Martin Kase <martin.kase@aukro.cz>
This commit is contained in:
1 parent
cbd2437d1d
commit
6ef9329db8
1 file changed
+3
-4
@@ -2044,17 +2044,16 @@ class GUIManager:
|
|||||||
foreground=self._fixed_map("foreground"),
|
foreground=self._fixed_map("foreground"),
|
||||||
background=self._fixed_map("background"),
|
background=self._fixed_map("background"),
|
||||||
)
|
)
|
||||||
|
# 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
|
# 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.
|
# on tab selection. We fold the Notebook.focus children into Notebook.padding children.
|
||||||
if theme != "classic":
|
|
||||||
original = style.layout("TNotebook.Tab")
|
original = style.layout("TNotebook.Tab")
|
||||||
sublayout = original[0][1]["children"][0][1]
|
sublayout = original[0][1]["children"][0][1]
|
||||||
sublayout["children"] = sublayout["children"][0][1]["children"]
|
sublayout["children"] = sublayout["children"][0][1]["children"]
|
||||||
style.layout("TNotebook.Tab", original)
|
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
|
# remove Checkbutton.focus dotted line from checkbuttons
|
||||||
if theme != "classic":
|
|
||||||
style.configure("TCheckbutton", padding=0)
|
style.configure("TCheckbutton", padding=0)
|
||||||
original = style.layout("TCheckbutton")
|
original = style.layout("TCheckbutton")
|
||||||
sublayout = original[0][1]["children"]
|
sublayout = original[0][1]["children"]
|
||||||
|
|||||||
Reference in new issue
Block a user