diff --git a/boot/lib/lvgui/lvgl/ffi.rb b/boot/lib/lvgui/lvgl/ffi.rb index 89977290..ff484f9b 100644 --- a/boot/lib/lvgui/lvgl/ffi.rb +++ b/boot/lib/lvgui/lvgl/ffi.rb @@ -66,7 +66,7 @@ module LVGL::FFI extern "lv_theme_t * lv_theme_get_night(void)" # lvgl/src/lv_themes/lv_theme_nixos.h - extern "lv_theme_t * lv_theme_nixos_init(lv_font_t *)" + extern "lv_theme_t * lv_theme_nixos_init(lv_font_t *, lv_font_t *)" extern "lv_theme_t * lv_theme_get_nixos(void)" # lvgl/src/lv_core/lv_obj.h diff --git a/boot/lib/lvgui/lvgl/hacks.rb b/boot/lib/lvgui/lvgl/hacks.rb index 264b84de..e7779482 100644 --- a/boot/lib/lvgui/lvgl/hacks.rb +++ b/boot/lib/lvgui/lvgl/hacks.rb @@ -77,9 +77,9 @@ module LVGL::Hacks ) end - def self.theme_nixos() + def self.theme_nixos(font = 0, button_font = 0) LVGL::FFI.lv_theme_set_current( - LVGL::FFI.lv_theme_nixos_init(0) + LVGL::FFI.lv_theme_nixos_init(font, button_font) ) end diff --git a/boot/lib/lvgui/lvgui/__init.rb b/boot/lib/lvgui/lvgui/__init.rb index 305fc600..3eca3fcd 100644 --- a/boot/lib/lvgui/lvgui/__init.rb +++ b/boot/lib/lvgui/lvgui/__init.rb @@ -101,8 +101,12 @@ module LVGUI # Start the animation core LVGL::FFI.lv_anim_core_init() - # And switch to the desired theme - LVGL::Hacks.send(:"theme_#{theme}") + if theme == :nixos then + LVGL::Hacks.theme_nixos(LVGUI::Fonts.primary(), LVGUI::Fonts.secondary()) + else + # And switch to the desired theme + LVGL::Hacks.send(:"theme_#{theme}") + end end # Runs the app, black boxes LVGL things.