-
Notifications
You must be signed in to change notification settings - Fork 111
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
Windows title bar tweaks #142
Conversation
Import pywinstyles only on Windows to avoid crashes on other OSes.
Hi, and thanks for your contribution! The code looks good to me, but I'm not sure I want to accept this feature to sv-ttk. In the past I've rejected multiple pull requests adding this functionality, and the reason is simple: sv-ttk is a simple ttk theme, that I wrapped in a Pypi package for convenience. I don't want to add other dependencies, nor features that would be trival to implement if the user wants it, using third party packages, like pywinstyles itself. I also don't use Windows, and wouldn't have any kind of capacity to maintain this feature. This is why I didn't integrate darkdetect, and I'm also not keen on adding titlebar coloring, especially as it would be a Windows-only feature. |
I would however welcome changes to the README, that explain how to integrate sv-ttk with |
I understand that's hard for you to maintain a feature like this and that your goal is just to make a simple ttk theme. But your idea to explain in README how to integrate the theme with 3rd party modules like |
I'm interested if you can set up a repo for it. Pretty neat! |
you can use nativesvttk if you want this |
Hi! In this PR I made sv_ttk change the color of the title bar to match the light or dark theme on Windows. Here are some screenshots:
Windows 11 Light
Windows 11 Dark
Windows 10 Light
Windows 10 Dark
Due to Windows 10 limitations, you can't set a custom title bar color. Instead, it can only be set to black in dark mode and white in light mode. On Windows 11 you can set its color to any color.
I made this PR also change the Toplevel windows' title bar color. Here are some screen recordings:
Windows.11.mp4
Windows.10.mp4