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

Rehighlight TextEditor when Theme changes #2818

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pml68
Copy link

@pml68 pml68 commented Feb 25, 2025

It's far from perfect, but it's something. Maybe it's even acceptable.

@edwloef
Copy link
Contributor

edwloef commented Feb 27, 2025

A better solution to this could be checking whether the theme has changed in the draw function, something like this: https://github.com/generic-daw/generic-daw/blob/d2d1c5f95733cd0169ffe03346491cfb959b9049/generic_daw_gui/src/widget/knob.rs#L205-L213

@pml68
Copy link
Author

pml68 commented Feb 27, 2025

I tried doing something like that, but adding PartialEq as a trait requirement to the Theme generic caused issues with the Widget trait, but I'll try again today. Maybe I just didn't read the error carefully.

@pml68
Copy link
Author

pml68 commented Feb 27, 2025

@edwloef I'm not sure what I did wrong last night, but it worked just fine this time around. Thanks for making me try again!

@pml68 pml68 changed the title Simple „solution” to #2817 Rehighlight TextEditor when Theme changes Feb 27, 2025
@pml68
Copy link
Author

pml68 commented Feb 27, 2025

This solves #2817

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

Successfully merging this pull request may close these issues.

2 participants