ttkbootstrap icon indicating copy to clipboard operation
ttkbootstrap copied to clipboard

Tooltip loses style when changing theme at runtime

Open antrrax opened this issue 2 years ago • 0 comments

Desktop (please complete the following information):

ttkbootstrap Version [1.9.0 OS: Linux Mint x64 Cinnamon X11

Describe the bug

Tooltip loses style when changing theme at runtime

Tooltip loses style when changing theme at runtime The tooltip background is usually a yellowish tone, but when changing to another theme the background is white, without style

To Reproduce

in the code below change the theme by the combobox. Hover over the button and the tooltip will be unstyled

import ttkbootstrap as ttk
from ttkbootstrap.constants import *
from ttkbootstrap.tooltip import ToolTip


app = ttk.Window(size=(300,300), themename='flatly')
b1 = ttk.Button(app, text="default tooltip")
b1.pack()

ToolTip(b1, text="This is the default style")



style = ttk.Style()
theme_names = style.theme_names()
current_theme = style.theme_use()

cbb_themes = ttk.Combobox(values=theme_names)
cbb_themes.pack()
cbb_themes.set(current_theme)
cbb_themes.bind('<<ComboboxSelected>>', lambda x: style.theme_use(cbb_themes.get()))
cbb_themes.configure(state="readonly")

app.mainloop()

Expected behavior

No response

Screenshots

error tootip

Additional context

No response

antrrax avatar Jul 24 '22 20:07 antrrax