| Crates.io | egui-theme-switch |
| lib.rs | egui-theme-switch |
| version | 0.5.1 |
| created_at | 2024-07-16 20:11:10.294773+00 |
| updated_at | 2026-01-13 07:05:23.673195+00 |
| description | A pretty theme switch for your egui app |
| homepage | |
| repository | https://codeberg.org/tautropfli/egui-theme-switch |
| max_upload_size | |
| id | 1305485 |
| size | 69,951 |
egui-theme-switchA very pretty theme switch widget for your egui app. It allows you to choose between dark, light and follow system.
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() {
// ...
}
Licensed under either of
at your option.
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.