feat(rlcd): runtime font size selector in Settings->Display
- device.properties bump default to 20 - lvgl_fonts add runtime override API (g_runtime_font_size + externs for all Montserrat sizes) - DisplaySettings add fontSize field persisted in properties - Display app adds Font size dropdown 14-28 applying immediately - Lvgl.cpp applies saved runtime font on boot - device.py new bucket <=20 includes all fonts for runtime switching (~150KB) Co-authored-by: internal-model
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <Tactility/settings/DisplaySettings.h>
|
||||
|
||||
#include <tactility/lvgl_module.h>
|
||||
#include <tactility/lvgl_fonts.h>
|
||||
#include <tactility/module.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
@@ -44,6 +45,11 @@ void attachDevices() {
|
||||
if (rotation != lv_display_get_rotation(lvgl_display)) {
|
||||
lv_display_set_rotation(lvgl_display, rotation);
|
||||
}
|
||||
// Apply runtime font size (0 = compile-time default)
|
||||
if (settings.fontSize != 0) {
|
||||
lvgl_set_runtime_font_size(settings.fontSize);
|
||||
LOGGER.info("Runtime font size set to {}", settings.fontSize);
|
||||
}
|
||||
// Apply invert setting if display supports it
|
||||
if (display->supportsInvertColor()) {
|
||||
display->setInvertColor(settings.invertColor);
|
||||
|
||||
Reference in New Issue
Block a user