d860ba1f34
- UiDensity moved to lvgl-module - Deleted tt_hal and tt_hal_gpio (breaks apps, but will fix those right after merging) - Added I2C 8 bit register operations - Added device.properties to simulator - Improved Tab5 hardware init, implement audio - Add README.md to kernel
30 lines
642 B
C++
30 lines
642 B
C++
#ifdef ESP_PLATFORM
|
|
|
|
#include <lvgl.h>
|
|
|
|
#include <tactility/lvgl_module.h>
|
|
|
|
#include <Tactility/service/gui/GuiService.h>
|
|
|
|
extern "C" {
|
|
|
|
extern lv_obj_t* __real_lv_textarea_create(lv_obj_t* parent);
|
|
|
|
lv_obj_t* __wrap_lv_textarea_create(lv_obj_t* parent) {
|
|
auto textarea = __real_lv_textarea_create(parent);
|
|
|
|
if (lvgl_get_ui_density() == LVGL_UI_DENSITY_COMPACT) {
|
|
lv_obj_set_style_pad_all(textarea, 2, LV_STATE_DEFAULT);
|
|
}
|
|
|
|
auto gui_service = tt::service::gui::findService();
|
|
if (gui_service != nullptr) {
|
|
gui_service->keyboardAddTextArea(textarea);
|
|
}
|
|
|
|
return textarea;
|
|
}
|
|
|
|
}
|
|
|
|
#endif // ESP_PLATFORM
|