TkinterEP / ttkthemes

A group of themes for the ttk extenstions for Tkinter
GNU General Public License v3.0
364 stars 47 forks source link

The themes makes my application slow #85

Open Jason-XII opened 3 years ago

Jason-XII commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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?