animate add column options

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-09-27 18:53:55 -04:00
parent 80be174f41
commit ebe4bf3046
2 changed files with 117 additions and 64 deletions

View File

@@ -1,5 +1,6 @@
use crate::colors::{
desktop_dark_color_theme, light_color_theme, mobile_dark_color_theme, ColorTheme,
use crate::{
colors::{desktop_dark_color_theme, light_color_theme, mobile_dark_color_theme, ColorTheme},
ui::is_narrow,
};
use egui::{
epaint::Shadow,
@@ -96,6 +97,14 @@ pub fn mobile_font_size(text_style: &NotedeckTextStyle) -> f32 {
}
}
pub fn get_font_size(ctx: &egui::Context, text_style: &NotedeckTextStyle) -> f32 {
if is_narrow(ctx) {
mobile_font_size(text_style)
} else {
desktop_font_size(text_style)
}
}
#[derive(Copy, Clone, Eq, PartialEq, Debug, EnumIter)]
pub enum NotedeckTextStyle {
Heading,