From aae04ccd4551d8b06b916da24473c658ac332954 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 10 Jun 2021 20:52:12 -0400 Subject: [PATCH] lvgui: Use correct fonts for status bar --- boot/lib/lvgui/lvgui/status_bar.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/boot/lib/lvgui/lvgui/status_bar.rb b/boot/lib/lvgui/lvgui/status_bar.rb index e7579dde..3f2d2390 100644 --- a/boot/lib/lvgui/lvgui/status_bar.rb +++ b/boot/lib/lvgui/lvgui/status_bar.rb @@ -9,8 +9,8 @@ class LVGUI::StatusBar < LVGUI::Widget style.body_main_color = LVGUI::Colors::STATUS_BAR style.body_grad_color = style.body_main_color style.body_border_width = 0 - style.body_padding_bottom = style.body_padding_top style.body_padding_top = 0 + style.body_padding_bottom = style.body_padding_top style.body_radius = 0 set_fit2(LVGL::FIT::FILL, LVGL::FIT::NONE) @@ -28,10 +28,22 @@ class LVGUI::StatusBar < LVGUI::Widget # [00:00 ] @clock = LVGUI::Clock.new(self) + @clock.instance_exec do + style = get_style(LVGL::LABEL_STYLE::MAIN).dup() + set_style(LVGL::LABEL_STYLE::MAIN, style) + style.text_font = LVGUI::Fonts.primary(19) + set_height(LVGUI.point_scale(19)) + end @clock.set_width(child_width) # [ 69%] @battery = LVGUI::Battery.new(self) @battery.set_width(child_width) + @battery.instance_exec do + style = get_style(LVGL::LABEL_STYLE::MAIN).dup() + set_style(LVGL::LABEL_STYLE::MAIN, style) + style.text_font = LVGUI::Fonts.primary(19) + set_height(LVGUI.point_scale(19)) + end end end