Skip to content
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

The themes makes my application slow #85

Open
Jason-XII opened this issue Aug 3, 2021 · 2 comments
Open

The themes makes my application slow #85

Jason-XII opened this issue Aug 3, 2021 · 2 comments
Labels

Comments

@Jason-XII
Copy link

When I used the "arc" and "breeze" theme for my application and maximized the application window, it suddenly seemed to slow down, but there was nothing wrong with my computer! Here are my code:

from tkinter import ttk
from tkinter import *
from ttkthemes import ThemedTk 

root = ThemedTk(theme="arc")
tabs = ttk.Notebook(root, padding=(10, 10, 10, 20))
tab_merge = ttk.Frame(root)
tab_extract = ttk.Frame(root)
tab_delete = ttk.Frame(root)
tabs.add(tab_merge, text="tab1")
tabs.add(tab_extract, text="tab2")
tabs.add(tab_delete, text="tab3")
tabs.pack(fill=BOTH, expand=True)
root.mainloop()

When I changed the theme to "adapta", suddenly everything turned ok which made me quite puzzled. What did this mean?

@rdbende
Copy link
Member

rdbende commented Aug 8, 2021

Use gif_override=True, for the ThemedTk.

Tkinter is very slow to display png images, so it's a good idea to use the gif version instead, although it may look worse.

@RedFantom
Copy link
Member

In the past an issue with theme plastik was fixed with the ttk.Notebook widget that caused an application using this theme to be very slow when this widget was incorporated into the UI, and even more with every added widget on screen.

Are you experiencing the issue with every theme when not using gif_override, or am I correct to understand that you have the problem with arc and breeze but not with adapta even when using default settings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants