We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After updating to version 2.6 it appears that the theme is no longer being applied to Toplevel widgets.
Using the following code:
import tkinter as tk from tkinter import ttk import sv_ttk root = tk.Tk() sv_ttk.use_light_theme() toplevel = tk.Toplevel(root) toplevel.title("Test Toplevel") ttk.Label(toplevel, text="Hello, world!").pack() ttk.Button(toplevel, text="Close", command=root.quit).pack() toplevel.protocol("WM_DELETE_WINDOW", root.quit) root.withdraw() root.mainloop()
On version 2.6 it looks like this (wrong):
On version 2.5.5 (correct):
This is on a Windows 11 system. I have not tested it yet on any other OS, so I am not sure if this is a problem for them too, or just Windows 11.
EDIT: I did test the Tk widget and the styles are applied correctly to widgets in it.
EDIT 2: It also looks like if there is a ttk widget added to the Tk widget, then the TopLevel displays correctly:
The text was updated successfully, but these errors were encountered:
It was caused by #113, I just tested it. That's strange, I test a lot but can not fix it.
Sorry, something went wrong.
I think it may have something to do with the event propogation. If I do:
root.after(10, sv_ttk.use_light_theme)
Then everything works.
No branches or pull requests
After updating to version 2.6 it appears that the theme is no longer being applied to Toplevel widgets.
Using the following code:
On version 2.6 it looks like this (wrong):
On version 2.5.5 (correct):
This is on a Windows 11 system. I have not tested it yet on any other OS, so I am not sure if this is a problem for them too, or just Windows 11.
EDIT:
I did test the Tk widget and the styles are applied correctly to widgets in it.
EDIT 2:
It also looks like if there is a ttk widget added to the Tk widget, then the TopLevel displays correctly:
The text was updated successfully, but these errors were encountered: