egui_css 0.1.1

Use css to styling egui
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::sync::LazyLock;

use egui::mutex::Mutex;

mod apply;
mod widget;

pub use cssengine::StyleSheet;
pub use widget::{StyledWidget, StyledWidgetExt};

pub(crate) static GLOBAL_STYLES: LazyLock<Mutex<Option<StyleSheet>>> =
    LazyLock::new(|| Mutex::new(None));

pub fn change_style(style: StyleSheet) {
    GLOBAL_STYLES.lock().replace(style);
}