I’m on v9.0
I’m trying to make two text labels with different font sizes align as if they were written on the same horizontal line. The code I’ve tried is
int align_content_bottom(lv_obj_t *reference, lv_obj_t *alignee) {
syslog(LOG_ERR, "aligning");
lv_area_t refarea;
lv_area_t algnarea;
lv_obj_update_layout(alignee);
lv_obj_get_content_coords(reference, &refarea);
lv_obj_get_content_coords(alignee, &algnarea);
lv_obj_set_y(alignee, lv_obj_get_y(alignee) - (algnarea.y2 - refarea.y2));
lv_obj_update_layout(alignee);
return 0;
}
Although the content bottoms are listed as the same, the alignee is always below the reference, regardless of which uses the bigger font. I may be misunderstanding the content area, but how can I find the true bottom of the text which is drawn?