Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bash/egui-theme-switch
A very pretty theme switch for your egui app
https://github.com/bash/egui-theme-switch
egui egui-widget
Last synced: 3 months ago
JSON representation
A very pretty theme switch for your egui app
- Host: GitHub
- URL: https://github.com/bash/egui-theme-switch
- Owner: bash
- License: apache-2.0
- Created: 2024-07-15T20:55:33.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-26T19:19:56.000Z (4 months ago)
- Last Synced: 2024-10-24T15:12:30.029Z (3 months ago)
- Topics: egui, egui-widget
- Language: Rust
- Homepage: http://tau.garden/egui-theme-switch/
- Size: 352 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license-apache.txt
Awesome Lists containing this project
README
# `egui-theme-switch`
[![Docs](https://img.shields.io/docsrs/egui-theme-switch/latest)](https://docs.rs/egui-theme-switch)
[![Crate Version](https://img.shields.io/crates/v/egui-theme-switch)](https://crates.io/crates/egui-theme-switch)A *very* pretty theme switch widget for your egui app.
It allows you to choose between dark, light and follow system.
## Example
```rust
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](https://tau.garden/egui-theme-switch/)
## [Docs](https://docs.rs/egui-theme-switch)
## License
Licensed under either of* Apache License, Version 2.0
([license-apache.txt](license-apache.txt) or )
* MIT license
([license-mit.txt](license-mit.txt) or )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.