israel-dryer / ttkbootstrap

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
MIT License
1.78k stars 358 forks source link

Button lost it's style after first run #544

Open Archertheone opened 4 months ago

Archertheone commented 4 months ago

Desktop (please complete the following information):

ttkbootstrap Version: 1.10.1 OS:windows 10

Describe the bug

I tried to run the following demo code in a jupyter notebook:

import ttkbootstrap as ttk
from ttkbootstrap.constants import *

root = ttk.Window()

b1 = ttk.Button(root, text="Solid Button", bootstyle=SUCCESS)
b1.pack(side=LEFT, padx=5, pady=10)

b2 = ttk.Button(root, text="Outline Button", bootstyle=(SUCCESS, OUTLINE))
b2.pack(side=LEFT, padx=5, pady=10)

root.mainloop()

It works well in the first run: first_run

However, after I click the close button and rerun the demo, the buttons lost their styles. second_run

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

Additional context

No response