theme: fix window styles

the headers are way too big
This commit is contained in:
William Casarin
2025-03-23 11:28:39 -07:00
parent 54deb2dd88
commit a21a3c079c
2 changed files with 5 additions and 16 deletions

View File

@@ -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,

View File

@@ -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
}