chore(format) add formatting for examples & demos, merge test config
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "../../lv_examples.h"
|
||||
#if LV_USE_BAR && LV_BUILD_EXAMPLES
|
||||
|
||||
static void set_value(void *bar, int32_t v)
|
||||
static void set_value(void * bar, int32_t v)
|
||||
{
|
||||
lv_bar_set_value(bar, v, LV_ANIM_OFF);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ static void event_cb(lv_event_t * e)
|
||||
lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e);
|
||||
if(dsc->part != LV_PART_INDICATOR) return;
|
||||
|
||||
lv_obj_t * obj= lv_event_get_target(e);
|
||||
lv_obj_t * obj = lv_event_get_target(e);
|
||||
|
||||
lv_draw_label_dsc_t label_dsc;
|
||||
lv_draw_label_dsc_init(&label_dsc);
|
||||
@@ -21,7 +21,8 @@ static void event_cb(lv_event_t * e)
|
||||
lv_snprintf(buf, sizeof(buf), "%d", (int)lv_bar_get_value(obj));
|
||||
|
||||
lv_point_t txt_size;
|
||||
lv_txt_get_size(&txt_size, buf, label_dsc.font, label_dsc.letter_space, label_dsc.line_space, LV_COORD_MAX, label_dsc.flag);
|
||||
lv_txt_get_size(&txt_size, buf, label_dsc.font, label_dsc.letter_space, label_dsc.line_space, LV_COORD_MAX,
|
||||
label_dsc.flag);
|
||||
|
||||
lv_area_t txt_area;
|
||||
/*If the indicator is long enough put the text inside on the right*/
|
||||
|
||||
Reference in New Issue
Block a user