mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
minor fixes
This commit is contained in:
parent
eb7909124e
commit
110f16e1df
@ -165,7 +165,6 @@ void lv_btnmatrix_set_map(lv_obj_t * btnm, const char * map[])
|
|||||||
lv_style_int_t bottom = lv_obj_get_style_pad_bottom(btnm, LV_BTNMATRIX_PART_BG);
|
lv_style_int_t bottom = lv_obj_get_style_pad_bottom(btnm, LV_BTNMATRIX_PART_BG);
|
||||||
lv_style_int_t inner = lv_obj_get_style_pad_inner(btnm, LV_BTNMATRIX_PART_BG);
|
lv_style_int_t inner = lv_obj_get_style_pad_inner(btnm, LV_BTNMATRIX_PART_BG);
|
||||||
|
|
||||||
|
|
||||||
lv_coord_t max_w = lv_obj_get_width(btnm) - left - right;
|
lv_coord_t max_w = lv_obj_get_width(btnm) - left - right;
|
||||||
lv_coord_t max_h = lv_obj_get_height(btnm) - top - bottom;
|
lv_coord_t max_h = lv_obj_get_height(btnm) - top - bottom;
|
||||||
lv_coord_t act_y = top;
|
lv_coord_t act_y = top;
|
||||||
@ -234,7 +233,7 @@ void lv_btnmatrix_set_map(lv_obj_t * btnm, const char * map[])
|
|||||||
/* Set the button's area.
|
/* Set the button's area.
|
||||||
* If inner padding is zero then use the prev. button x2 as x1 to avoid rounding
|
* If inner padding is zero then use the prev. button x2 as x1 to avoid rounding
|
||||||
* errors*/
|
* errors*/
|
||||||
if(btn_i != 0 && inner == 0 && ((act_x == left && base_dir != LV_BIDI_DIR_RTL) ||
|
if(btn_i != 0 && inner == 0 && ((act_x != left && base_dir != LV_BIDI_DIR_RTL) ||
|
||||||
(act_x + act_unit_w == max_w - right && base_dir == LV_BIDI_DIR_RTL))) {
|
(act_x + act_unit_w == max_w - right && base_dir == LV_BIDI_DIR_RTL))) {
|
||||||
lv_area_set(&ext->button_areas[btn_i], ext->button_areas[btn_i - 1].x2, act_y, act_x + act_unit_w,
|
lv_area_set(&ext->button_areas[btn_i], ext->button_areas[btn_i - 1].x2, act_y, act_x + act_unit_w,
|
||||||
act_y + btn_h);
|
act_y + btn_h);
|
||||||
|
@ -102,6 +102,8 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy)
|
|||||||
lv_style_list_copy(&ext->style_knob, ©_ext->style_knob);
|
lv_style_list_copy(&ext->style_knob, ©_ext->style_knob);
|
||||||
lv_area_copy(&ext->left_knob_area, ©_ext->left_knob_area);
|
lv_area_copy(&ext->left_knob_area, ©_ext->left_knob_area);
|
||||||
lv_area_copy(&ext->right_knob_area, ©_ext->right_knob_area);
|
lv_area_copy(&ext->right_knob_area, ©_ext->right_knob_area);
|
||||||
|
|
||||||
|
lv_obj_refresh_style(slider, LV_OBJ_PART_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_INFO("slider created");
|
LV_LOG_INFO("slider created");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user