default appearance to dark instead of system light

This commit is contained in:
2026-10-09 19:58:39 +07:00
parent df411bd044
commit c0cfdb8996
4 changed files with 9 additions and 8 deletions
+5 -4
View File
@@ -12,11 +12,12 @@ use crate::{Theme, ThemeMode};
/// it wherever their settings live; this crate never touches disk.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize)]
pub enum AppearanceMode {
/// Follow the OS. The default — matches every other native app on the
/// machine, including when the OS is set to switch at sunset.
#[default]
/// Follow the OS — matches every other native app on the machine,
/// including when the OS is set to switch at sunset.
System,
Light,
/// Paint dark regardless of the OS.
#[default]
Dark,
}
@@ -62,7 +63,7 @@ pub fn init(mode: AppearanceMode, cx: &mut App) {
Theme::change(resolve(mode, system), None, cx);
}
/// The mode currently in effect (defaults to `System` before [`init`]).
/// The mode currently in effect (defaults to `Dark` before [`init`]).
pub fn mode(cx: &App) -> AppearanceMode {
cx.try_global::<AppearanceState>()
.map(|state| state.mode)