1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

egui_web: default to light mode unless prefers-color-scheme: dark

This commit is contained in:
Emil Ernerfeldt
2021-06-07 20:56:18 +02:00
parent 44b573f6a6
commit 62f58a3b05
8 changed files with 54 additions and 16 deletions

View File

@@ -279,6 +279,10 @@ pub struct IntegrationInfo {
/// If the app is running in a Web context, this returns information about the environment.
pub web_info: Option<WebInfo>,
/// Does the system prefer dark mode (over light mode)?
/// `None` means "don't know".
pub prefer_dark_mode: Option<bool>,
/// Seconds of cpu usage (in seconds) of UI code on the previous frame.
/// `None` if this is the first frame.
pub cpu_usage: Option<f32>,