Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
matthew-efseaff opened this issue Apr 17, 2024 · 4 comments

Comments

@matthew-efseaff
Copy link

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
Copy link
Owner

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

@matthew-efseaff
Copy link
Author

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
Copy link

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
Copy link

Atem83 commented Aug 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants