From da20541117fd4f9aa590617e98d0c4936e2f3216 Mon Sep 17 00:00:00 2001 From: circular Date: Mon, 18 Nov 2024 17:25:31 +1100 Subject: [PATCH] feat: basic theming :3 --- src/ui/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ui/src/main.rs b/src/ui/src/main.rs index f17eb2d..0c7601f 100644 --- a/src/ui/src/main.rs +++ b/src/ui/src/main.rs @@ -5,7 +5,7 @@ pub mod channel; use std::sync::Arc; use app_state::AppState; -use components::theme::Theme; +use components::theme::{Theme, ThemeColor, ThemeMode}; use gpui::*; use http_client::anyhow; @@ -47,7 +47,13 @@ async fn main() { return; } - Theme::sync_system_appearance(cx); + let mut theme = Theme::from(ThemeColor::dark()); + theme.mode = ThemeMode::Dark; + theme.accent = hsla(335.0 / 360.0, 97.0 / 100.0, 61.0 / 100.0, 1.0); + theme.title_bar = hsla(335.0 / 360.0, 97.0 / 100.0, 61.0 / 100.0, 1.0); + + cx.set_global(theme); + cx.refresh(); let opts = WindowOptions { window_decorations: Some(WindowDecorations::Client),