-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ttk-based theming #2241
base: develop
Are you sure you want to change the base?
Ttk-based theming #2241
Conversation
The native themes - vista, xpnative, winnative - use elements (e.g. buttons, notebooks) whose customization is very limited; most notably, their background colors cannot be changed
Problem: while yeeting the alternative title bar for the Windows native dark one would rid us of the former's gnarly minimize/restore handling, the Transparent theme doesn't work on the latter - as its background color needs to be the exact same as the rest of the window (and worse, it changes upon deselecting). The only pre-Windows 11 way to change a title bar's color (at least without invoking a mountain of undocumented Win32 calls that'd defeat its purpose anyway) is through the Windows App SDK, a set of WinRT APIs that work all the way back to version 1809. ...also, this SDK might open the door for cleaner alternatives of our Win32 API sprawl in the future - even beyond the ongoing move to |
Also updated theme.py to pywin32 ahead of EDCD#2263, in order to minimize the merging mess
# Conflicts: # config/windows.py # prefs.py # theme.py
Description
This replaces Tk widgets with their Ttk equivalents and makes
theme.apply()
use actual Ttk themes, which are implemented as Tcl packages.It also sets the colors for all non-Ttk widgets the correct way, via
tk_setPalette
, and eliminates the need for most ofmyNotebook
(with the exception ofEntryMenu
, which has added functionality).Plugins should be minimally affected, and can be encouraged to use Ttk from then on.
Type of Change
UI. As in, all of it.
How Tested
The application is being live tested with my plugin setup - those with interfaces (main screen and/or preferences) are:
In addition, a comprehensive catalog of Ttk widgets was added as a core plugin (accessible only with the
--ttk-catalog
argument), to showcase them for plugin authors and help any future theme development.Notes
Closes #2116