ttkthemes icon indicating copy to clipboard operation
ttkthemes copied to clipboard

The themes makes my application slow

Open Jason-XII opened this issue 3 years ago • 2 comments

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?

Jason-XII avatar Aug 03 '21 01:08 Jason-XII

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.

rdbende avatar Aug 08 '21 18:08 rdbende

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?

RedFantom avatar Aug 08 '21 19:08 RedFantom