1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Run code formatter

This commit is contained in:
Gabor Kiss-Vamosi 2020-07-21 13:29:36 +02:00
parent ecfef570ea
commit 960bca7807
14 changed files with 166 additions and 154 deletions

View File

@ -85,8 +85,10 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor
static void report_style_mod_core(void * style_p, lv_obj_t * obj);
static void refresh_children_style(lv_obj_t * obj);
static void base_dir_refr_children(lv_obj_t * obj);
static void obj_align_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, bool x_set, bool y_set, lv_coord_t x_ofs, lv_coord_t y_ofs);
static void obj_align_origo_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, bool x_set, bool y_set, lv_coord_t x_ofs, lv_coord_t y_ofs);
static void obj_align_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, bool x_set, bool y_set,
lv_coord_t x_ofs, lv_coord_t y_ofs);
static void obj_align_origo_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, bool x_set, bool y_set,
lv_coord_t x_ofs, lv_coord_t y_ofs);
#if LV_USE_ANIMATION
static lv_style_trans_t * trans_create(lv_obj_t * obj, lv_style_property_t prop, uint8_t part, lv_state_t prev_state,
lv_state_t new_state);
@ -3818,7 +3820,8 @@ static void base_dir_refr_children(lv_obj_t * obj)
}
}
static void obj_align_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, bool x_set, bool y_set, lv_coord_t x_ofs, lv_coord_t y_ofs)
static void obj_align_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, bool x_set, bool y_set,
lv_coord_t x_ofs, lv_coord_t y_ofs)
{
lv_point_t new_pos;
_lv_area_align(&base->coords, &obj->coords, align, &new_pos);
@ -3837,7 +3840,8 @@ static void obj_align_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t ali
else if(y_set) lv_obj_set_y(obj, new_pos.y);
}
static void obj_align_origo_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, bool x_set, bool y_set, lv_coord_t x_ofs, lv_coord_t y_ofs)
static void obj_align_origo_core(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, bool x_set, bool y_set,
lv_coord_t x_ofs, lv_coord_t y_ofs)
{
lv_coord_t new_x = lv_obj_get_x(obj);
lv_coord_t new_y = lv_obj_get_y(obj);

View File

@ -517,10 +517,12 @@ static void lv_refr_area_part(const lv_area_t * area_p)
lv_area_t a;
lv_area_set(&a, 0, 0, header.w - 1, header.h - 1);
lv_draw_img(&a, &start_mask, disp_refr->bg_img, &dsc);
} else {
}
else {
LV_LOG_WARN("Can't draw the background image")
}
} else {
}
else {
lv_draw_rect_dsc_t dsc;
lv_draw_rect_dsc_init(&dsc);
dsc.bg_color = disp_refr->bg_color;

View File

@ -115,7 +115,8 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic
}
bool prefilter = fdsc->bitmap_format == LV_FONT_FMT_TXT_COMPRESSED ? true : false;
decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], decompr_buf, gdsc->box_w, gdsc->box_h, (uint8_t)fdsc->bpp, prefilter);
decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], decompr_buf, gdsc->box_w, gdsc->box_h, (uint8_t)fdsc->bpp,
prefilter);
return decompr_buf;
}
@ -371,7 +372,8 @@ static void decompress(const uint8_t * in, uint8_t * out, lv_coord_t w, lv_coord
bits_write(out, wrp, line_buf1[x], bpp);
wrp += wr_size;
}
} else {
}
else {
decompress_line(line_buf1, w);
for(x = 0; x < w; x++) {

View File

@ -151,7 +151,8 @@ typedef struct _disp_t {
struct _lv_obj_t * top_layer; /**< @see lv_disp_get_layer_top */
struct _lv_obj_t * sys_layer; /**< @see lv_disp_get_layer_sys */
uint8_t del_prev :1; /**< 1: Automatically delete the previous screen when the screen load animation is ready */
uint8_t del_prev :
1; /**< 1: Automatically delete the previous screen when the screen load animation is ready */
lv_color_t bg_color; /**< Default display color when screens are transparent*/
const void * bg_img; /**< An image source to display as wallpaper*/

View File

@ -474,12 +474,15 @@ static lv_design_res_t lv_roller_design(lv_obj_t * roller, const lv_area_t * cli
/*Get the size of the "selected text"*/
lv_point_t res_p;
_lv_txt_get_size(&res_p, lv_label_get_text(label), label_dsc.font, label_dsc.letter_space, label_dsc.line_space, lv_obj_get_width(roller), LV_TXT_FLAG_EXPAND);
_lv_txt_get_size(&res_p, lv_label_get_text(label), label_dsc.font, label_dsc.letter_space, label_dsc.line_space,
lv_obj_get_width(roller), LV_TXT_FLAG_EXPAND);
/*Move the selected label proportionally with the background label*/
lv_coord_t roller_h = lv_obj_get_height(roller);
int32_t label_y_prop = label->coords.y1 - (roller_h / 2 + roller->coords.y1); /*label offset from the middle line of the roller*/
label_y_prop = (label_y_prop << 14) / lv_obj_get_height(label); /*Proportional position from the middle line (upscaled)*/
int32_t label_y_prop = label->coords.y1 - (roller_h / 2 +
roller->coords.y1); /*label offset from the middle line of the roller*/
label_y_prop = (label_y_prop << 14) / lv_obj_get_height(
label); /*Proportional position from the middle line (upscaled)*/
/*Apply a correction with different line heights*/
const lv_font_t * normal_label_font = lv_obj_get_style_text_font(roller, LV_ROLLER_PART_BG);