mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-29 14:16:40 +00:00
Add recolor for label and btn objects
This commit is contained in:
parent
c7f5493de6
commit
186420ef50
@ -620,6 +620,7 @@ void hasp_new_object(const JsonObject & config, uint8_t & saved_page_id)
|
|||||||
lv_obj_t * lbl = lv_label_create(obj, NULL);
|
lv_obj_t * lbl = lv_label_create(obj, NULL);
|
||||||
if(lbl) {
|
if(lbl) {
|
||||||
lv_label_set_text(lbl, "");
|
lv_label_set_text(lbl, "");
|
||||||
|
lv_label_set_recolor(lbl, true);
|
||||||
lbl->user_data.objid = LV_HASP_LABEL;
|
lbl->user_data.objid = LV_HASP_LABEL;
|
||||||
lv_obj_align(lbl, NULL, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(lbl, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||||
}
|
}
|
||||||
@ -642,6 +643,7 @@ void hasp_new_object(const JsonObject & config, uint8_t & saved_page_id)
|
|||||||
obj = lv_label_create(parent_obj, NULL);
|
obj = lv_label_create(parent_obj, NULL);
|
||||||
if(obj) {
|
if(obj) {
|
||||||
lv_label_set_long_mode(obj, LV_LABEL_LONG_CROP);
|
lv_label_set_long_mode(obj, LV_LABEL_LONG_CROP);
|
||||||
|
lv_label_set_recolor(obj, true);
|
||||||
lv_obj_set_event_cb(obj, generic_event_handler);
|
lv_obj_set_event_cb(obj, generic_event_handler);
|
||||||
obj->user_data.objid = LV_HASP_LABEL;
|
obj->user_data.objid = LV_HASP_LABEL;
|
||||||
}
|
}
|
||||||
@ -950,7 +952,8 @@ void hasp_object_delete(lv_obj_t * obj)
|
|||||||
|
|
||||||
case LV_HASP_BTNMATRIX:
|
case LV_HASP_BTNMATRIX:
|
||||||
my_btnmatrix_map_clear(obj);
|
my_btnmatrix_map_clear(obj);
|
||||||
_LV_WIN_PART_REAL_LAST; _LV_WIN_PART_VIRTUAL_LAST;
|
_LV_WIN_PART_REAL_LAST;
|
||||||
|
_LV_WIN_PART_VIRTUAL_LAST;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LV_HASP_GAUGE:
|
case LV_HASP_GAUGE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user