db6d3b4acb
## Improvements - Created new base driver classes: `EspLcdDisplayV2' and `EspLcdSpiDisplay` - Updated `St7789Display` to implement `EspLcdSpiDisplay` - Updated all boards with ST7789 display ## Fixes - Ensure that `tmp/` is created on startup (for all writeable filesystems) - Fix for `lv_list` padding on small screen devices - Fix for `PreferencesEsp` not processing result when writing string to NVS ## Other - Remove unused build scripts
36 lines
982 B
C++
36 lines
982 B
C++
#ifdef ESP_PLATFORM
|
|
|
|
#include <Tactility/Tactility.h>
|
|
|
|
#include <lvgl.h>
|
|
|
|
extern "C" {
|
|
|
|
extern lv_obj_t* __real_lv_list_create(lv_obj_t* parent);
|
|
extern lv_obj_t* __real_lv_list_add_button(lv_obj_t* list, const void* icon, const char* txt);
|
|
|
|
lv_obj_t* __wrap_lv_list_create(lv_obj_t* parent) {
|
|
auto* list = __real_lv_list_create(parent);
|
|
|
|
if (tt::hal::getConfiguration()->uiScale == tt::hal::UiScale::Smallest) {
|
|
lv_obj_set_style_pad_row(list, 2, LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_column(list, 2, LV_STATE_DEFAULT);
|
|
lv_obj_set_style_pad_all(list, 2, LV_STATE_DEFAULT);
|
|
}
|
|
|
|
return list;
|
|
}
|
|
|
|
lv_obj_t* __wrap_lv_list_add_button(lv_obj_t* list, const void* icon, const char* txt) {
|
|
auto* button = __real_lv_list_add_button(list, icon, txt);
|
|
|
|
if (tt::hal::getConfiguration()->uiScale == tt::hal::UiScale::Smallest) {
|
|
lv_obj_set_style_pad_ver(button, 2, LV_STATE_DEFAULT);
|
|
}
|
|
|
|
return button;
|
|
}
|
|
|
|
}
|
|
|
|
#endif // ESP_PLATFORM
|