4 releases

new 0.2.1 Dec 9, 2024
0.2.0 Sep 26, 2024
0.1.1 Jul 18, 2024
0.1.0 Jul 16, 2024

#197 in GUI

Download history 5/week @ 2024-08-23 18/week @ 2024-08-30 6/week @ 2024-09-06 24/week @ 2024-09-13 125/week @ 2024-09-20 122/week @ 2024-09-27 30/week @ 2024-10-04 97/week @ 2024-10-11 30/week @ 2024-10-18 15/week @ 2024-10-25 36/week @ 2024-11-01 61/week @ 2024-11-08 40/week @ 2024-11-15 16/week @ 2024-11-22 21/week @ 2024-11-29 637/week @ 2024-12-06

755 downloads per month

MIT/Apache

30KB
525 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::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.

Dependencies

~4–9MB
~84K SLoC