mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-25 01:04:25 +08:00
fix(text): handle recolor in lv_text_get_size (#8026)
This commit is contained in:
committed by
GitHub
parent
0259397ecd
commit
471ba51edf
+2
-1
@@ -118,7 +118,8 @@ void lv_text_get_size(lv_point_t * size_res, const char * text, const lv_font_t
|
||||
}
|
||||
|
||||
/*Calculate the longest line*/
|
||||
int32_t act_line_length = lv_text_get_width(&text[line_start], new_line_start - line_start, font, letter_space);
|
||||
int32_t act_line_length = lv_text_get_width_with_flags(&text[line_start], new_line_start - line_start, font,
|
||||
letter_space, flag);
|
||||
|
||||
size_res->x = LV_MAX(act_line_length, size_res->x);
|
||||
line_start = new_line_start;
|
||||
|
||||
@@ -430,6 +430,7 @@ void lv_obj_remove_from_subject(lv_obj_t * obj, lv_subject_t * subject)
|
||||
* `LV_EVENT_VALUE_CHANGED` event associated with `subject` in case
|
||||
* one of the `..._bind_value()` functions was used. */
|
||||
lv_obj_remove_event_cb_with_user_data(obj, NULL, subject);
|
||||
|
||||
}
|
||||
|
||||
void * lv_observer_get_target(lv_observer_t * observer)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Reference in New Issue
Block a user