|
@@ -9,7 +9,7 @@ void elements_button_top_left(Canvas* canvas, const char* str) {
|
|
|
const uint8_t button_height = 12;
|
|
const uint8_t button_height = 12;
|
|
|
const uint8_t vertical_offset = 3;
|
|
const uint8_t vertical_offset = 3;
|
|
|
const uint8_t horizontal_offset = 3;
|
|
const uint8_t horizontal_offset = 3;
|
|
|
- const uint8_t string_width = canvas_string_width(canvas, str);
|
|
|
|
|
|
|
+ uint16_t string_width = canvas_string_width(canvas, str);
|
|
|
const Icon* icon = &I_ButtonUp_7x4;
|
|
const Icon* icon = &I_ButtonUp_7x4;
|
|
|
const uint8_t icon_h_offset = 3;
|
|
const uint8_t icon_h_offset = 3;
|
|
|
const uint8_t icon_width_with_offset = icon->width + icon_h_offset;
|
|
const uint8_t icon_width_with_offset = icon->width + icon_h_offset;
|
|
@@ -25,7 +25,7 @@ void elements_button_top_left(Canvas* canvas, const char* str) {
|
|
|
canvas_draw_line(canvas, x + button_width + 2, y - button_height, x + button_width + 2, y - 3);
|
|
canvas_draw_line(canvas, x + button_width + 2, y - button_height, x + button_width + 2, y - 3);
|
|
|
|
|
|
|
|
canvas_invert_color(canvas);
|
|
canvas_invert_color(canvas);
|
|
|
- canvas_draw_icon(canvas, x + horizontal_offset, y - icon_v_offset, &I_ButtonUp_7x4);
|
|
|
|
|
|
|
+ canvas_draw_icon(canvas, x + horizontal_offset, y - icon_v_offset, icon);
|
|
|
canvas_draw_str(
|
|
canvas_draw_str(
|
|
|
canvas, x + horizontal_offset + icon_width_with_offset, y - vertical_offset, str);
|
|
canvas, x + horizontal_offset + icon_width_with_offset, y - vertical_offset, str);
|
|
|
canvas_invert_color(canvas);
|
|
canvas_invert_color(canvas);
|
|
@@ -35,7 +35,7 @@ void elements_button_top_right(Canvas* canvas, const char* str) {
|
|
|
const uint8_t button_height = 12;
|
|
const uint8_t button_height = 12;
|
|
|
const uint8_t vertical_offset = 3;
|
|
const uint8_t vertical_offset = 3;
|
|
|
const uint8_t horizontal_offset = 3;
|
|
const uint8_t horizontal_offset = 3;
|
|
|
- const uint8_t string_width = canvas_string_width(canvas, str);
|
|
|
|
|
|
|
+ uint16_t string_width = canvas_string_width(canvas, str);
|
|
|
const Icon* icon = &I_ButtonUp_7x4;
|
|
const Icon* icon = &I_ButtonUp_7x4;
|
|
|
const uint8_t icon_h_offset = 3;
|
|
const uint8_t icon_h_offset = 3;
|
|
|
const uint8_t icon_width_with_offset = icon->width + icon_h_offset;
|
|
const uint8_t icon_width_with_offset = icon->width + icon_h_offset;
|
|
@@ -52,7 +52,6 @@ void elements_button_top_right(Canvas* canvas, const char* str) {
|
|
|
|
|
|
|
|
canvas_invert_color(canvas);
|
|
canvas_invert_color(canvas);
|
|
|
canvas_draw_str(canvas, x - button_width + horizontal_offset, y - vertical_offset, str);
|
|
canvas_draw_str(canvas, x - button_width + horizontal_offset, y - vertical_offset, str);
|
|
|
- canvas_draw_icon(
|
|
|
|
|
- canvas, x - horizontal_offset - icon->width, y - icon_v_offset, &I_ButtonUp_7x4);
|
|
|
|
|
|
|
+ canvas_draw_icon(canvas, x - horizontal_offset - icon->width, y - icon_v_offset, icon);
|
|
|
canvas_invert_color(canvas);
|
|
canvas_invert_color(canvas);
|
|
|
}
|
|
}
|