You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A number of locations in the code eschew the TTK library and continue to use the original "tk" library. This holds us back from supporting custom themes as well as breaks a few things. That, and TK in general is just... awful to work with.
We should migrate as much of the styling code as possible from tk to ttk.
As said on Discord, I propose the use of CustomTkinter as a semi-drop-in replacement. My arguments:
It's extremely light on dependencies (darkdetect is self-explanatory and packaging is used for version detection logic; neither depends on anything else)
The API avoids deviating from standard Tk as much as possible
Well-maintained
Reasonably popular (~10k stars, supported by many other libraries)
Modernized widgets - while still supporting the original Tkinter ones
Automatic HiDPI scaling - though the factor can be overridden if so desired
Perhaps the most important of all: a painless theming support (fully configurable via .json files)
The only dependency is Pillow, which is already on develop anyway.
EDIT: the latest release does not work with Pillow 10.x - which means no Python 3.12 either; although it's fixed on master (see: israel-dryer/ttkbootstrap#490), the dev has been AWOL for a while.
Although there's a fix on the comments, facing such an issue from the outset - after both libraries gave me hope to start tackling our UI nightmare - just makes me want to yeet anything Tkinter-based into an active volcano.
Activity
ElSaico commentedon May 15, 2024
As said on Discord, I propose the use of CustomTkinter as a semi-drop-in replacement. My arguments:
darkdetectis self-explanatory andpackagingis used for version detection logic; neither depends on anything else).jsonfiles)ElSaico commentedon May 23, 2024
Option B: https://ttkbootstrap.readthedocs.io/en/latest/Less popular but still nothing to scoff at with ~1.7k stars - and the documentation is much nicer.
The only dependency is Pillow, which is already ondevelopanyway.EDIT: the latest release does not work with Pillow 10.x - which means no Python 3.12 either; although it's fixed on
master(see: israel-dryer/ttkbootstrap#490), the dev has been AWOL for a while.ElSaico commentedon May 23, 2024
CTk's scaling code stumbles upon an ancient Tk bug in some locales: TomSchimansky/CustomTkinter#571
Although there's a fix on the comments, facing such an issue from the outset - after both libraries gave me hope to start tackling our UI nightmare - just makes me want to yeet anything Tkinter-based into an active volcano.
[EDCD#2116] Handover More Values to TTK
[EDCD#2116] Hand more things to TTK
Rixxan commentedon Nov 12, 2025
After #2525, the following files still have old TK elements that (in theory) could be reformatted to TTK: