Skip to content

Commit

Permalink
fix: Fix a bug where calling function apply_theme in non-Windows sy…
Browse files Browse the repository at this point in the history
…stems caused unnecessary warnings
  • Loading branch information
Xiaokang2022 committed Jan 16, 2025
1 parent aaff0e9 commit 7d05863
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tkintertools/core/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ def theme(
"""
self.update()
self.configure(bg=getattr(self, value)["bg"])
manager.apply_theme(self, theme="dark" if value == "dark" else "normal")

if platform.system() == "Windows": # Now only support for Windows OS
manager.apply_theme(
self, theme="dark" if value == "dark" else "normal")

if include_children:
for child in self.children.values():
Expand Down

0 comments on commit 7d05863

Please sign in to comment.