Co-authored-by: ymh-masuda <160470322+ymh-masuda@users.noreply.github.com>
This commit is contained in:
@@ -473,7 +473,10 @@ static void draw_main(lv_event_t * e)
|
|||||||
|
|
||||||
/*Proportional position from the middle line.
|
/*Proportional position from the middle line.
|
||||||
*Will be 0 for the first option, and 1 for the last option (upscaled by << 14)*/
|
*Will be 0 for the first option, and 1 for the last option (upscaled by << 14)*/
|
||||||
label_y_prop = (label_y_prop << 14) / (lv_obj_get_height(label) - normal_label_font->line_height);
|
int32_t remain_h = lv_obj_get_height(label) - normal_label_font->line_height;
|
||||||
|
if(remain_h > 0) {
|
||||||
|
label_y_prop = (label_y_prop << 14) / remain_h;
|
||||||
|
}
|
||||||
|
|
||||||
/*We don't want the selected label start and end exactly where the normal label is as
|
/*We don't want the selected label start and end exactly where the normal label is as
|
||||||
*a larger font won't centered on selected area.*/
|
*a larger font won't centered on selected area.*/
|
||||||
|
|||||||
Reference in New Issue
Block a user