From 491343b683929fc1745e3338b78a932dd6803799 Mon Sep 17 00:00:00 2001 From: Aleksandr Kutuzov Date: Fri, 16 Oct 2020 16:36:05 +0300 Subject: [PATCH] GUI: reformat sources --- applications/gui/canvas.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/applications/gui/canvas.c b/applications/gui/canvas.c index c353bca3..842397bd 100644 --- a/applications/gui/canvas.c +++ b/applications/gui/canvas.c @@ -54,7 +54,7 @@ void canvas_api_free(CanvasApi* api) { void canvas_commit(CanvasApi* api) { assert(api); - Canvas* canvas = (Canvas *)api; + Canvas* canvas = (Canvas*)api; u8g2_SetPowerSave(&canvas->fb, 0); // wake up display u8g2_SendBuffer(&canvas->fb); } @@ -75,35 +75,35 @@ void canvas_frame_set( uint8_t canvas_width(CanvasApi* api) { assert(api); - Canvas* canvas = (Canvas *)api; + Canvas* canvas = (Canvas*)api; return canvas->width; } uint8_t canvas_height(CanvasApi* api) { assert(api); - Canvas* canvas = (Canvas *)api; + Canvas* canvas = (Canvas*)api; return canvas->height; } void canvas_clear(CanvasApi* api) { assert(api); - Canvas* canvas = (Canvas *)api; + Canvas* canvas = (Canvas*)api; u8g2_ClearBuffer(&canvas->fb); } void canvas_color_set(CanvasApi* api, Color color) { assert(api); - Canvas* canvas = (Canvas *)api; + Canvas* canvas = (Canvas*)api; u8g2_SetDrawColor(&canvas->fb, color); } void canvas_font_set(CanvasApi* api, Font font) { assert(api); - Canvas* canvas = (Canvas *)api; + Canvas* canvas = (Canvas*)api; u8g2_SetFontMode(&canvas->fb, 1); - if (font == FontPrimary) { + if(font == FontPrimary) { u8g2_SetFont(&canvas->fb, u8g2_font_Born2bSportyV2_tr); - } else if (font == FontSecondary) { + } else if(font == FontSecondary) { u8g2_SetFont(&canvas->fb, u8g2_font_HelvetiPixel_tr); } else { assert(0); @@ -112,7 +112,7 @@ void canvas_font_set(CanvasApi* api, Font font) { void canvas_str_draw(CanvasApi* api, uint8_t x, uint8_t y, const char* str) { assert(api); - Canvas* canvas = (Canvas *)api; + Canvas* canvas = (Canvas*)api; x += canvas->offset_x; y += canvas->offset_y; u8g2_DrawStr(&canvas->fb, x, y, str);