Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Remove Eurocorp font/mainmenu, -4k DFU
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Feb 12, 2024
1 parent 88d51a3 commit 90111a2
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const char* const menu_style_names[MenuStyleCount] = {
"PS4",
"Vertical",
"C64",
"Eurocorp",
"Compact",
"Terminal",
};
Expand Down
4 changes: 0 additions & 4 deletions applications/services/gui/canvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const CanvasFontParameters canvas_font_params[FontTotalNumber] = {
[FontKeyboard] = {.leading_default = 11, .leading_min = 9, .height = 7, .descender = 2},
[FontBigNumbers] = {.leading_default = 18, .leading_min = 16, .height = 15, .descender = 0},
[FontBatteryPercent] = {.leading_default = 11, .leading_min = 9, .height = 6, .descender = 0},
[FontEurocorp] = {.leading_default = 12, .leading_min = 11, .height = 16, .descender = 2},
};

Canvas* canvas_init() {
Expand Down Expand Up @@ -197,9 +196,6 @@ void canvas_set_font(Canvas* canvas, Font font) {
case FontBatteryPercent:
u8g2_SetFont(&canvas->fb, u8g2_font_5x7_tr); //u8g2_font_micro_tr);
break;
case FontEurocorp:
u8g2_SetFont(&canvas->fb, u8g2_font_eurocorp_tr);
break;
default:
furi_crash();
break;
Expand Down
4 changes: 0 additions & 4 deletions applications/services/gui/canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,13 @@ typedef enum {
ColorXOR = 0x02,
} Color;

/** Provide defines to permit checking if new are fonts available*/
#define CANVAS_HAS_FONT_EUROCORP = 1

/** Fonts enumeration */
typedef enum {
FontPrimary,
FontSecondary,
FontKeyboard,
FontBigNumbers,
FontBatteryPercent,
FontEurocorp,

// Keep last for fonts number calculation
FontTotalNumber,
Expand Down
41 changes: 0 additions & 41 deletions applications/services/gui/modules/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ static void menu_short_name(MenuItem* item, FuriString* name) {
}
}

static void menu_string_to_upper_case(FuriString* str) {
for(size_t i = 0; i < furi_string_size(str); i++) {
char c = furi_string_get_char(str, i);
if(c >= 'a' && c <= 'z') {
furi_string_set_char(str, i, c - 'a' + 'A');
}
}
}

static void menu_centered_icon(
Canvas* canvas,
MenuItem* item,
Expand Down Expand Up @@ -325,36 +316,6 @@ static void menu_draw_callback(Canvas* canvas, void* _model) {

break;
}
case MenuStyleEurocorp: {
#ifdef CANVAS_HAS_FONT_EUROCORP
canvas_set_font(canvas, FontEurocorp);
#else
canvas_set_font(canvas, FontPrimary);
#endif
for(uint8_t i = 0; i < 3; i++) {
canvas_set_color(canvas, ColorBlack);
shift_position = (position + items_count + i - 1) % items_count;
item = MenuItemArray_get(model->items, shift_position);
menu_short_name(item, name);
menu_string_to_upper_case(name);
size_t scroll_counter = menu_scroll_counter(model, i == 1);
if(i == 1) {
canvas_draw_box(canvas, 0, 22, 128, 22);
canvas_set_color(canvas, ColorWhite);
// Clip corner
for(uint8_t i = 0; i < 6; i++) {
for(uint8_t j = 0; j < 6; j++) {
if(j - i >= 0) {
canvas_draw_dot(canvas, 128 - i, 22 + j - i);
}
}
}
}
elements_scrollable_text_line(
canvas, 2, 19 + 22 * i, 128 - 3, name, scroll_counter, false);
}
break;
}
case MenuStyleCompact: {
size_t index;
size_t y_off, x_off;
Expand Down Expand Up @@ -653,7 +614,6 @@ static void menu_process_up(Menu* menu) {

switch(xtreme_settings.menu_style) {
case MenuStyleList:
case MenuStyleEurocorp:
case MenuStyleTerminal:
if(position > 0) {
position--;
Expand Down Expand Up @@ -705,7 +665,6 @@ static void menu_process_down(Menu* menu) {

switch(xtreme_settings.menu_style) {
case MenuStyleList:
case MenuStyleEurocorp:
case MenuStyleTerminal:
if(position < count - 1) {
position++;
Expand Down
1 change: 0 additions & 1 deletion lib/xtreme/xtreme.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ typedef enum {
MenuStylePs4,
MenuStyleVertical,
MenuStyleC64,
MenuStyleEurocorp,
MenuStyleCompact,
MenuStyleTerminal,
MenuStyleCount,
Expand Down

0 comments on commit 90111a2

Please sign in to comment.