From a21a3c079ced4fe17a98a93f2c01db0abb6cf524 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 23 Mar 2025 11:28:39 -0700 Subject: [PATCH] theme: fix window styles the headers are way too big --- crates/notedeck/src/fonts.rs | 8 ++++---- crates/notedeck/src/theme.rs | 13 +------------ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/crates/notedeck/src/fonts.rs b/crates/notedeck/src/fonts.rs index a226c1bd..5fed62d2 100644 --- a/crates/notedeck/src/fonts.rs +++ b/crates/notedeck/src/fonts.rs @@ -22,8 +22,8 @@ impl NamedFontFamily { pub fn desktop_font_size(text_style: &NotedeckTextStyle) -> f32 { match text_style { - NotedeckTextStyle::Heading => 48.0, - NotedeckTextStyle::Heading2 => 24.0, + NotedeckTextStyle::Heading => 24.0, + NotedeckTextStyle::Heading2 => 22.0, NotedeckTextStyle::Heading3 => 20.0, NotedeckTextStyle::Heading4 => 14.0, NotedeckTextStyle::Body => 16.0, @@ -37,8 +37,8 @@ pub fn desktop_font_size(text_style: &NotedeckTextStyle) -> f32 { pub fn mobile_font_size(text_style: &NotedeckTextStyle) -> f32 { // TODO: tweak text sizes for optimal mobile viewing match text_style { - NotedeckTextStyle::Heading => 48.0, - NotedeckTextStyle::Heading2 => 24.0, + NotedeckTextStyle::Heading => 24.0, + NotedeckTextStyle::Heading2 => 22.0, NotedeckTextStyle::Heading3 => 20.0, NotedeckTextStyle::Heading4 => 14.0, NotedeckTextStyle::Body => 13.0, diff --git a/crates/notedeck/src/theme.rs b/crates/notedeck/src/theme.rs index 6e5605fc..0b57d2ab 100644 --- a/crates/notedeck/src/theme.rs +++ b/crates/notedeck/src/theme.rs @@ -1,6 +1,6 @@ use egui::{ style::{Selection, WidgetVisuals, Widgets}, - Color32, CornerRadius, Shadow, Stroke, Visuals, + Color32, CornerRadius, Stroke, Visuals, }; pub struct ColorTheme { @@ -82,17 +82,6 @@ pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals { }, extreme_bg_color: theme.extreme_bg_color, error_fg_color: theme.err_fg_color, - window_fill: theme.window_fill, - window_shadow: Shadow { - offset: [0, 8], - blur: 24, - spread: 0, - color: egui::Color32::from_rgba_unmultiplied(0x6D, 0x6D, 0x6D, 0x14), - }, - window_stroke: Stroke { - width: 1.0, - color: theme.window_stroke_color, - }, image_loading_spinners: false, ..default }