Akascape / CTkToolTip

Small pop-up widget for displaying details inside customtkinter. (extension/add-on)
Creative Commons Zero v1.0 Universal
111 stars 7 forks source link

Dark to Light (and vice versa) appearance transitions don't change background of tooltip #22

Open matthew-efseaff opened 4 months ago

matthew-efseaff commented 4 months ago

Start in dark theme: dark theme change to light theme in app: light theme The background color of the tooltip should change since the text is changing.

Akascape commented 4 months ago

@matthew-efseaff Are you using a single bg_color? Can you show the code?

matthew-efseaff commented 4 months ago

I'm using vanilla themes from CTk (blue, dark-blue, green) and don't set bg_color anywhere. ToolTip is set on initialization: self.btn_project_explore_tip = CTkToolTip(self.btn_project_explore, delay=0.1, message='Display Text' Then configured later: self.btn_project_explore_tip.configure(message='Different Text') Changing Dark/Light: self.sub_drop_appearance.add_option(option="Light", command=lambda: ctk.set_appearance_mode("light")

Is there any other code you'd like to see?

If Dark is changed to Light in the app the tooltip text changes color but the tooltip background stays (dark background, dark text). My initialization saves the Dark/Light choice on exit. So, if I exit and restart, the Light choice initializes and the tooltip is displayed correctly (light background, dark text). Thank you

vu-the-dung commented 2 months ago

i also have same issue with your CTkScrollableDropdown and CTkToolTip. I don't set bg_color, Dark/Light change in Windows 10 Settings->Personalization->Colors, and no widgets configured when changing dark/light

Atem83 commented 1 week ago

same problem here To fix the problem, I created a method to set dark and light theme and added to it a configure bg_color of the tooltip to switch between dark and light background too.

The light bg_color I used is "gray86" and dark bg_color is "gray17", it's the default fg_color for the blue theme of a CTkFrame