refactor: Remove all unwanted whitespace

This commit is contained in:
Kostas Missos
2019-10-18 18:02:06 +03:00
parent 9104b85143
commit 7c42f72b8a
135 changed files with 842 additions and 841 deletions

View File

@@ -67,7 +67,7 @@ void lv_init(void)
/* Do nothing if already initialized */
if (_lv_initialized)
return;
LV_GC_ROOT(_lv_def_scr) = NULL;
LV_GC_ROOT(_lv_act_scr) = NULL;
LV_GC_ROOT(_lv_top_layer) = NULL;
@@ -1938,8 +1938,8 @@ static void delete_children(lv_obj_t * obj)
lv_obj_t * i_next;
i = lv_ll_get_head(&(obj->child_ll));
/*Remove from the group; remove before transversing children so that
* the object still has access to all children during the
/*Remove from the group; remove before transversing children so that
* the object still has access to all children during the
* LV_SIGNAL_DEFOCUS call*/
#if USE_LV_GROUP
if(obj->group_p != NULL) lv_group_remove_obj(obj);

View File

@@ -24,7 +24,7 @@
***********************************************************************************/
/*Store the glyph descriptions*/
static const lv_font_glyph_dsc_t hekate_symbol_120_glyph_dsc[] =
static const lv_font_glyph_dsc_t hekate_symbol_120_glyph_dsc[] =
{
#if USE_HEKATE_SYMBOL_120 == 8
{.w_px = 103, .glyph_index = 0}, /*Unicode: U+f002 ()*/
@@ -35,7 +35,7 @@ static const lv_font_glyph_dsc_t hekate_symbol_120_glyph_dsc[] =
#endif
};
lv_font_t hekate_symbol_120 =
lv_font_t hekate_symbol_120 =
{
.unicode_first = LV_SYMBOL_GLYPH_FIRST, /*First Unicode letter in this font*/
.unicode_last = LV_SYMBOL_GLYPH_LAST, /*Last Unicode letter in this font*/

View File

@@ -24,7 +24,7 @@
***********************************************************************************/
/*Store the glyph descriptions*/
static const lv_font_glyph_dsc_t hekate_symbol_20_glyph_dsc[] =
static const lv_font_glyph_dsc_t hekate_symbol_20_glyph_dsc[] =
{
#if USE_HEKATE_SYMBOL_20 == 4
{.w_px = 5, .glyph_index = 0}, /*Unicode: U+f001 ()*/
@@ -133,7 +133,7 @@ static const lv_font_glyph_dsc_t hekate_symbol_20_glyph_dsc[] =
#endif
};
lv_font_t hekate_symbol_20 =
lv_font_t hekate_symbol_20 =
{
.unicode_first = LV_SYMBOL_GLYPH_FIRST, /*First Unicode letter in this font*/
.unicode_last = LV_SYMBOL_GLYPH_LAST, /*Last Unicode letter in this font*/

View File

@@ -24,7 +24,7 @@
***********************************************************************************/
/*Store the glyph descriptions*/
static const lv_font_glyph_dsc_t hekate_symbol_30_glyph_dsc[] =
static const lv_font_glyph_dsc_t hekate_symbol_30_glyph_dsc[] =
{
#if USE_HEKATE_SYMBOL_30 == 4
{.w_px = 7, .glyph_index = 0}, /*Unicode: U+f001 ()*/
@@ -133,7 +133,7 @@ static const lv_font_glyph_dsc_t hekate_symbol_30_glyph_dsc[] =
#endif
};
lv_font_t hekate_symbol_30 =
lv_font_t hekate_symbol_30 =
{
.unicode_first = LV_SYMBOL_GLYPH_FIRST, /*First Unicode letter in this font*/
.unicode_last = LV_SYMBOL_GLYPH_LAST, /*Last Unicode letter in this font*/

View File

@@ -23,7 +23,7 @@
***********************************************************************************/
/*Store the glyph descriptions*/
static const lv_font_glyph_dsc_t interui_20_glyph_dsc[] =
static const lv_font_glyph_dsc_t interui_20_glyph_dsc[] =
{
#if USE_INTERUI_20 == 4
{.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/
@@ -222,7 +222,7 @@ static const lv_font_glyph_dsc_t interui_20_glyph_dsc[] =
#endif
};
lv_font_t interui_20 =
lv_font_t interui_20 =
{
.unicode_first = 32, /*First Unicode letter in this font*/
.unicode_last = 126, /*Last Unicode letter in this font*/

View File

@@ -23,7 +23,7 @@
***********************************************************************************/
/*Store the glyph descriptions*/
static const lv_font_glyph_dsc_t interui_30_glyph_dsc[] =
static const lv_font_glyph_dsc_t interui_30_glyph_dsc[] =
{
#if USE_INTERUI_30 == 4
{.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/
@@ -222,7 +222,7 @@ static const lv_font_glyph_dsc_t interui_30_glyph_dsc[] =
#endif
};
lv_font_t interui_30 =
lv_font_t interui_30 =
{
.unicode_first = 32, /*First Unicode letter in this font*/
.unicode_last = 126, /*Last Unicode letter in this font*/

View File

@@ -23,7 +23,7 @@
***********************************************************************************/
/*Store the glyph descriptions*/
static const lv_font_glyph_dsc_t ubuntu_mono_glyph_dsc[] =
static const lv_font_glyph_dsc_t ubuntu_mono_glyph_dsc[] =
{
#if USE_UBUNTU_MONO == 4
{.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/
@@ -222,7 +222,7 @@ static const lv_font_glyph_dsc_t ubuntu_mono_glyph_dsc[] =
#endif
};
lv_font_t ubuntu_mono =
lv_font_t ubuntu_mono =
{
.unicode_first = 32, /*First Unicode letter in this font*/
.unicode_last = 126, /*Last Unicode letter in this font*/

View File

@@ -25,7 +25,7 @@
* STATIC VARIABLES
**********************/
#if (!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0
LV_ROOTS
LV_ROOTS
#endif /* LV_ENABLE_GC */
/**********************
* MACROS

View File

@@ -41,15 +41,14 @@ extern "C" {
prefix void * _lv_task_act;\
prefix void * _lv_indev_list;\
prefix void * _lv_disp_list;\
#define LV_NO_PREFIX
#define LV_ROOTS LV_GC_ROOTS(LV_NO_PREFIX)
#if LV_ENABLE_GC == 1
# if LV_MEM_CUSTOM != 1
# error "GC requires CUSTOM_MEM"
# endif /* LV_MEM_CUSTOM */
# endif /* LV_MEM_CUSTOM */
#else /* LV_ENABLE_GC */
# define LV_GC_ROOT(x) x
LV_GC_ROOTS(extern)

View File

@@ -189,9 +189,9 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
} else { /*Check the actual length*/
n_char_since_last_break++;
letter_width = lv_font_get_width(font, letter);
cur_w += letter_width;
cur_w += letter_width;
/* Get the length of the current work and determine best place
/* Get the length of the current work and determine best place
* to break the line. */
if(cur_w > max_width) {
if( last_break != NO_BREAK_FOUND ) {
@@ -231,7 +231,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
}
other = false;
break;
}
}
n_char_since_last_break++;
lv_coord_t letter_width2 = lv_font_get_width(font, letter);
cur_w += letter_width2;

View File

@@ -801,7 +801,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask)
lv_area_t label_area;
lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar);
label_area.y1 = calendar->coords.y1 + get_header_height(calendar) +
ext->style_day_names->body.padding.ver + lv_font_get_height(ext->style_day_names->text.font) +
ext->style_day_names->body.padding.ver + lv_font_get_height(ext->style_day_names->text.font) +
ext->style_day_names->body.padding.ver;
label_area.y2 = label_area.y1 + lv_font_get_height(style_bg->text.font);

View File

@@ -429,10 +429,10 @@ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2
y1 = point2.y;
int dx = abs(x1-x0), sx = x0<x1 ? 1 : -1;
int dy = abs(y1-y0), sy = y0<y1 ? 1 : -1;
int dy = abs(y1-y0), sy = y0<y1 ? 1 : -1;
int err = (dx>dy ? dx : -dy)/2, e2;
for(;;){
for(;;){
lv_canvas_set_px(canvas, x0, y0, color);
if (x0==x1 && y0==y1) break;
@@ -449,7 +449,7 @@ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2
* @param color line color of the triangle
*/
void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t color)
{
{
lv_canvas_draw_polygon(canvas, points, 3, color);
}
@@ -460,7 +460,7 @@ void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t
* @param color line color of the rectangle
*/
void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t color)
{
{
lv_canvas_draw_polygon(canvas, points, 4, color);
}
@@ -472,7 +472,7 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t colo
* @param color line color of the polygon
*/
void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t color)
{
{
uint8_t i;
for(i=0; i < (size - 1); i++) {
@@ -512,7 +512,7 @@ void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size,
* @param x x coordinate of the start position (seed)
* @param y y coordinate of the start position (seed)
* @param boundary_color edge/boundary color of the area
* @param fill_color fill color of the area
* @param fill_color fill color of the area
*/
void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t boundary_color, lv_color_t fill_color)
{

View File

@@ -202,7 +202,7 @@ void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size,
* @param x x coordinate of the start position (seed)
* @param y y coordinate of the start position (seed)
* @param boundary_color edge/boundary color of the area
* @param fill_color fill color of the area
* @param fill_color fill color of the area
*/
void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t boundary_color, lv_color_t fill_color);

View File

@@ -606,7 +606,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig
/*Add a down symbol in ddlist when closed*/
else
{
{
/*Draw a arrow in ddlist if enabled*/
if(ext->draw_arrow)
{

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file lv_ddlist.h
*

View File

@@ -101,7 +101,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy)
lv_list_ext_t * ext = lv_obj_allocate_ext_attr(new_list, sizeof(lv_list_ext_t));
lv_mem_assert(ext);
if(ext == NULL) return NULL;
// Important!
static lv_style_t img_btn_color;
lv_style_copy( &img_btn_color, &lv_style_plain);
@@ -116,7 +116,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy)
ext->anim_time = LV_LIST_FOCUS_TIME;
ext->single_mode = false;
ext->size = 0;
#if USE_LV_GROUP
ext->last_sel = NULL;
ext->selected_btn = NULL;

View File

@@ -121,14 +121,14 @@ bool lv_list_remove(const lv_obj_t * list, uint32_t index);
/*=====================
* Setter functions
*====================*/
/**
* Set single button selected mode, only one button will be selected if enabled.
* @param list pointer to the currently pressed list object
* @param mode, enable(true)/disable(false) single selected mode.
*/
void lv_list_set_single_mode(lv_obj_t *list, bool mode);
#if USE_LV_GROUP
/**
@@ -193,7 +193,7 @@ void lv_list_set_style(lv_obj_t *list, lv_list_style_t type, lv_style_t *style);
* @param list pointer to the currently pressed list object.
*/
bool lv_list_get_single_mode(lv_obj_t *list);
/**
* Get the text of a list element
* @param btn pointer to list element

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file lv_page.h
*

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file lv_win.c
*

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
*@file lv_themes.h
*

File diff suppressed because it is too large Load Diff