egui-theme-switch

Crates.ioegui-theme-switch
lib.rsegui-theme-switch
version0.2.0
sourcesrc
created_at2024-07-16 20:11:10.294773
updated_at2024-09-26 19:18:50.978293
descriptionA pretty theme switch for your egui app
homepage
repositoryhttps://github.com/bash/egui-theme-switch
max_upload_size
id1305485
size74,938
Tau Gärtli (bash)

documentation

README

egui-theme-switch

Docs Crate Version

A very pretty theme switch widget for your egui app. It allows you to choose between dark, light and follow system.

Screenshot of a tri-state switch with three options: follow system, dark, light

Example

use egui::ThemePreference;
use egui_theme_switch::{ThemeSwitch, global_theme_switch};

// A switch for egui's global theme preference:
global_theme_switch(ui);

// ... or alternatively:
let mut preference = ThemePreference::System;
if ui.add(ThemeSwitch::new(&mut preference)).changed() {
    // ...
}

Interactive Demo

Docs

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 46

cargo fmt