pub fn install_variants(
ctx: &Context,
tokens: Tokens,
counterpart: Option<Tokens>,
) -> Arc<Tokens>Expand description
Installs a theme and, when given one of the other mode, its
counterpart: each is written into its own egui style (dark or light)
with its own kit, and Tokens::of and Kit::of give the one of
egui’s theme of the moment. egui’s mode is set to the theme’s (the
first one), as when it is alone, and it is egui’s fallback when the
system says nothing; set_preference (or ctx.set_theme) then
switches between the two, or follows the system, without installing
anything again. A counterpart of the same mode is ignored (with a
warning): the theme is installed alone. Fonts and icon sizes come
from the first theme. Returns the first theme’s tokens.