2 releases

0.1.1 Jul 18, 2024
0.1.0 Jul 16, 2024

#211 in GUI

40 downloads per month

MIT/Apache

45KB
560 lines

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_theme_switch::{ThemeSwitch, ThemePreference};

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.

Dependencies

~4–10MB
~84K SLoC