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

Set theme without context available #10

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Conversation

lampsitter
Copy link
Contributor

@lampsitter lampsitter commented Aug 18, 2023

My current project's theming code was structured around using egui::Visuals directly, so I was unable to call the set_theme function.

@Stonks3141
Copy link
Member

Stonks3141 commented Aug 18, 2023

What's stopping you from just adding your own changes to the visuals after calling set_theme?

Edit: I understand now, you want to be able to set visuals without having access to a context.

@Stonks3141
Copy link
Member

At the moment, I'm not convinced that this unusual usecase is worth supporting. It would make it more difficult to potentially use other fields in egui::style::Style in the future and increase the API surface. I would prefer to add another function that would take a Style instead of a Context. Would that work for you instead?

@lampsitter
Copy link
Contributor Author

Understandable that you want to be able use Style in the future. Is the new function okay?

@lampsitter lampsitter changed the title Get Visuals directly Set theme without context available Aug 18, 2023
@Stonks3141 Stonks3141 merged commit 8db4c01 into catppuccin:main Aug 22, 2023
3 checks passed
@Stonks3141
Copy link
Member

Thanks!

@lampsitter lampsitter deleted the visuals branch August 22, 2023 14:55
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