use embedded_graphics::{ fonts::Text, pixelcolor::Rgb565, prelude::*, primitive_style, primitives::rectangle::Rectangle, primitives::Line, style::PrimitiveStyle, style::TextStyle, style::TextStyleBuilder, text_style, }; use profont::{ProFont12Point, ProFont14Point}; pub struct Styles { pub fill_black: PrimitiveStyle, pub text: TextStyle, pub text_green: TextStyle, pub text_red: TextStyle, pub text_big: TextStyle, pub text_big_black: TextStyle, pub normal_box: PrimitiveStyle, pub selected_box: PrimitiveStyle, pub ok_box: PrimitiveStyle, pub cancel_box: PrimitiveStyle, pub grid: PrimitiveStyle, pub profile_color: Rgb565, pub temp_color: Rgb565, } impl Styles { pub fn new() -> Styles { Styles { fill_black: primitive_style!(fill_color = Rgb565::BLACK), text: text_style!(font = ProFont12Point, text_color = Rgb565::WHITE), text_green: text_style!(font = ProFont12Point, text_color = Rgb565::GREEN), text_red: text_style!(font = ProFont12Point, text_color = Rgb565::RED), text_big: text_style!(font = ProFont14Point, text_color = Rgb565::WHITE), text_big_black: text_style!(font = ProFont14Point, text_color = Rgb565::BLACK), normal_box: primitive_style!( fill_color = Rgb565::BLACK, stroke_color = Rgb565::WHITE, stroke_width = 1 ), selected_box: primitive_style!( fill_color = Rgb565::BLUE, stroke_color = Rgb565::WHITE, stroke_width = 1 ), ok_box: primitive_style!( fill_color = Rgb565::GREEN, stroke_color = Rgb565::WHITE, stroke_width = 1 ), cancel_box: primitive_style!( fill_color = Rgb565::GREEN, stroke_color = Rgb565::WHITE, stroke_width = 1 ), grid: primitive_style!(stroke_color = Rgb565::new(4, 8, 4), stroke_width = 1), profile_color: Rgb565::new(24, 48, 24), temp_color: Rgb565::RED, } } }