Skip to content

Changing Theme #610

Answered by M-Adoo
Maikel1963 asked this question in Q&A
Jul 8, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

I guess what you want is:

let mut palette = Palette::default();
palette.primary = Color::RED;
FullTheme {
  palette: Rc::new(palette),
  ..Default::default()
}

By the way, Ribir's theme is currently read-only. At runtime you can only replace the entire theme or do a partial reload via InheritTheme. However, the theme API is not yet stable and will change in the next one or two releases.
We may allow direct modification of themes at runtime.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Maikel1963
Comment options

@M-Adoo
Comment options

@Maikel1963
Comment options

Answer selected by Maikel1963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants