Refactor RootLayout and UIHandler for improved structure and functionality
- Updated RootLayout to manage layout initialization and deinitialization more effectively. - Removed unnecessary dependencies and streamlined event handling for keyboard events. - Enhanced UIHandler to utilize shared pointers for app descriptors, improving memory management. - Added methods for showing and hiding navigation elements in RootLayout. - Introduced textarea widget with instant response by disabling animations. - Improved error handling and logging throughout the UI components.
This commit is contained in:
10
main/ui/widgets/textarea.cpp
Normal file
10
main/ui/widgets/textarea.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "ui/widgets/textarea.h"
|
||||
|
||||
lv_obj_t* textarea_create(lv_obj_t* parent) {
|
||||
lv_obj_t* textarea = lv_textarea_create(parent);
|
||||
// disable animations for cursor and selection for instant response
|
||||
lv_obj_set_style_anim_time(textarea, 0, LV_PART_CURSOR | LV_STATE_FOCUSED);
|
||||
|
||||
return textarea;
|
||||
}
|
||||
|
||||
4
main/ui/widgets/textarea.h
Normal file
4
main/ui/widgets/textarea.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
#include "lvgl.h"
|
||||
|
||||
lv_obj_t* textarea_create(lv_obj_t* parent);
|
||||
Reference in New Issue
Block a user