mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
various ui/ux changes
text spacing reduced from 4px to 3px some text was replaced
This commit is contained in:
@@ -105,9 +105,7 @@ static void nfc_scene_read_success_on_enter_felica(NfcApp* instance) {
|
||||
if(data->workflow_type == FelicaLite) {
|
||||
bool all_unlocked = data->blocks_read == data->blocks_total;
|
||||
furi_string_cat_printf(
|
||||
temp_str,
|
||||
"\e#%s\n",
|
||||
all_unlocked ? "All Blocks Are Unlocked" : "Some Blocks Are Locked");
|
||||
temp_str, "\e#%s\n", all_unlocked ? "All Blocks Unlocked" : "Some Blocks Locked");
|
||||
nfc_render_felica_idm(data, NfcProtocolFormatTypeShort, temp_str);
|
||||
uint8_t* ck_data = instance->felica_auth->card_key.data;
|
||||
furi_string_cat_printf(temp_str, "Key:");
|
||||
|
||||
@@ -153,7 +153,7 @@ FlipperFormat* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx
|
||||
bool subghz_history_get_text_space_left(SubGhzHistory* instance, FuriString* output) {
|
||||
furi_assert(instance);
|
||||
if(memmgr_get_free_heap() < SUBGHZ_HISTORY_FREE_HEAP) {
|
||||
if(output != NULL) furi_string_printf(output, " Free heap LOW");
|
||||
if(output != NULL) furi_string_printf(output, " RAM almost FULL");
|
||||
return true;
|
||||
}
|
||||
if(instance->last_index_write == SUBGHZ_HISTORY_MAX) {
|
||||
|
||||
@@ -339,7 +339,7 @@ void elements_multiline_text_aligned(
|
||||
furi_check(text);
|
||||
|
||||
size_t lines_count = 0;
|
||||
size_t font_height = canvas_current_font_height(canvas);
|
||||
size_t font_height = canvas_current_font_height(canvas) - 1;
|
||||
FuriString* line;
|
||||
|
||||
/* go through text line by line and count lines */
|
||||
@@ -384,7 +384,7 @@ void elements_multiline_text(Canvas* canvas, int32_t x, int32_t y, const char* t
|
||||
furi_check(canvas);
|
||||
furi_check(text);
|
||||
|
||||
size_t font_height = canvas_current_font_height(canvas);
|
||||
size_t font_height = canvas_current_font_height(canvas) - 1;
|
||||
FuriString* str;
|
||||
str = furi_string_alloc();
|
||||
const char* start = text;
|
||||
@@ -407,7 +407,7 @@ void elements_multiline_text_framed(Canvas* canvas, int32_t x, int32_t y, const
|
||||
furi_check(canvas);
|
||||
furi_check(text);
|
||||
|
||||
size_t font_height = canvas_current_font_height(canvas);
|
||||
size_t font_height = canvas_current_font_height(canvas) - 1;
|
||||
size_t str_width = canvas_string_width(canvas, text);
|
||||
|
||||
// count \n's
|
||||
@@ -778,7 +778,7 @@ void elements_text_box(
|
||||
// Fill line parameters
|
||||
size_t line_leading_min = font_params->leading_min;
|
||||
size_t line_leading_default = font_params->leading_default;
|
||||
size_t line_height = font_params->height;
|
||||
size_t line_height = font_params->height - 1;
|
||||
size_t line_descender = font_params->descender;
|
||||
size_t line_num = 0;
|
||||
size_t line_width = 0;
|
||||
|
||||
@@ -152,7 +152,7 @@ static void widget_element_text_scroll_draw(Canvas* canvas, WidgetElement* eleme
|
||||
}
|
||||
canvas_draw_str_aligned(
|
||||
canvas, x, y, line->horizontal, AlignTop, furi_string_get_cstr(line->text));
|
||||
y += params->leading_default;
|
||||
y += params->leading_default - 1;
|
||||
}
|
||||
// Draw scroll bar
|
||||
if(model->scroll_pos_total > 1) {
|
||||
|
||||
@@ -430,7 +430,7 @@ static bool
|
||||
} else if(
|
||||
DURATION_DIFF((float)(abs(instance->data_raw[i])), (classes[k].data)) <
|
||||
(classes[k].data / 4)) { //if the test value does not differ by more than 25%
|
||||
classes[k].data += ((float)(abs(instance->data_raw[i]))-classes[k].data) *
|
||||
classes[k].data += ((float)(abs(instance->data_raw[i])) - classes[k].data) *
|
||||
0.05f; //running average k=0.05
|
||||
classes[k].count++;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user