fix warning and remove test code from an example

This commit is contained in:
Gabor Kiss-Vamosi
2021-08-03 16:36:10 +02:00
parent 202d977eb2
commit 4f9a037b93
3 changed files with 3 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ static void btnm_event_handler(lv_event_t * e)
void lv_example_textarea_1(void)
{
lv_obj_t * ta = lv_textarea_create(lv_scr_act());
// lv_textarea_set_one_line(ta, true);
lv_textarea_set_one_line(ta, true);
lv_obj_align(ta, LV_ALIGN_TOP_MID, 0, 10);
lv_obj_add_event_cb(ta, textarea_event_handler, LV_EVENT_READY, ta);
lv_obj_add_state(ta, LV_STATE_FOCUSED); /*To be sure the cursor is visible*/
@@ -38,8 +38,6 @@ void lv_example_textarea_1(void)
lv_obj_add_event_cb(btnm, btnm_event_handler, LV_EVENT_VALUE_CHANGED, ta);
lv_obj_clear_flag(btnm, LV_OBJ_FLAG_CLICK_FOCUSABLE); /*To keep the text area focused on button clicks*/
lv_btnmatrix_set_map(btnm, btnm_map);
lv_textarea_set_text(ta, "שלום עולם!");
}
#endif

View File

@@ -458,7 +458,7 @@ lv_part_t lv_obj_style_get_selector_part(lv_style_selector_t selector)
}
lv_text_align_t lv_obj_calculate_style_text_align(struct _lv_obj_t * obj, lv_part_t part, const char * txt)
lv_text_align_t lv_obj_calculate_style_text_align(const struct _lv_obj_t * obj, lv_part_t part, const char * txt)
{
lv_text_align_t align = lv_obj_get_style_text_align(obj, part);
lv_base_dir_t base_dir = lv_obj_get_style_base_dir(obj, part);

View File

@@ -220,7 +220,7 @@ static inline void lv_obj_set_style_size(struct _lv_obj_t * obj, lv_coord_t val
lv_obj_set_style_height(obj, value, selector);
}
lv_text_align_t lv_obj_calculate_style_text_align(struct _lv_obj_t * obj, lv_part_t part, const char * txt);
lv_text_align_t lv_obj_calculate_style_text_align(const struct _lv_obj_t * obj, lv_part_t part, const char * txt);
/**********************
* MACROS