mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-27 19:53:42 +08:00
lv_ddlist: bugfix with font antialiassing
This commit is contained in:
parent
7f49404d62
commit
ad89961737
@ -314,7 +314,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const area_t * mask, lv_design_m
|
||||
cord_t font_h = font_get_height(font) >> LV_FONT_ANTIALIAS;
|
||||
area_t rect_area;
|
||||
rect_area.y1 = ext->opt_label->cords.y1;
|
||||
rect_area.y1 += ext->sel_opt * font_h + style->list_labels.line_space;
|
||||
rect_area.y1 += ext->sel_opt * (font_h + style->list_labels.line_space);
|
||||
rect_area.y1 -= style->sel_rects.vpad;
|
||||
|
||||
rect_area.y2 = rect_area.y1 + font_h + 2 * style->sel_rects.vpad;
|
||||
@ -434,9 +434,10 @@ static void lv_ddlist_pos_act_option(lv_obj_t * ddlist)
|
||||
lv_ddlist_ext_t * ext = lv_obj_get_ext(ddlist);
|
||||
lv_ddlists_t * style = lv_obj_get_style(ddlist);
|
||||
const font_t * font = font_get(style->list_labels.font);
|
||||
cord_t font_h = font_get_height(font) >> LV_FONT_ANTIALIAS;
|
||||
|
||||
lv_obj_set_y(lv_page_get_scrl(ddlist),
|
||||
-(ext->sel_opt * (font_get_height(font) + style->list_labels.line_space) +
|
||||
-(ext->sel_opt * (font_h + style->list_labels.line_space) +
|
||||
style->pages.scrl_rects.vpad) + style->sel_rects.vpad);
|
||||
|
||||
}
|
||||
|
6
lvgl.h
6
lvgl.h
@ -3,8 +3,8 @@
|
||||
* Include all LittleV GL related headers
|
||||
*/
|
||||
|
||||
#ifndef LV_GL_H
|
||||
#define LV_GL_H
|
||||
#ifndef LVGL_H
|
||||
#define LVGL_H
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
@ -28,7 +28,6 @@
|
||||
#error "LV: incompatible misc. module version! See lvgl.h"
|
||||
#endif
|
||||
|
||||
#include <lvgl/lv_objx/lv_chart.h>
|
||||
#include "lv_obj/lv_obj.h"
|
||||
#include "lv_objx/lv_btn.h"
|
||||
#include "lv_objx/lv_img.h"
|
||||
@ -37,6 +36,7 @@
|
||||
#include "lv_objx/lv_page.h"
|
||||
#include "lv_objx/lv_rect.h"
|
||||
#include "lv_objx/lv_list.h"
|
||||
#include "lv_objx/lv_chart.h"
|
||||
#include "lv_objx/lv_cb.h"
|
||||
#include "lv_objx/lv_pb.h"
|
||||
#include "lv_objx/lv_led.h"
|
||||
|
Loading…
Reference in New Issue
Block a user