mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-12 19:43:33 -07:00
Fix SubGHz GUI receiver bug
When keyboard is locked and popup appears it now shows bottom text correctly
This commit is contained in:
@@ -250,7 +250,28 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
|
||||
break;
|
||||
case SubGhzViewReceiverBarShowToUnlockPress:
|
||||
canvas_draw_str(canvas, 44, 62, furi_string_get_cstr(model->frequency_str));
|
||||
#ifdef SUBGHZ_EXT_PRESET_NAME
|
||||
if(model->history_item == 0 && model->mode == SubGhzViewReceiverModeLive) {
|
||||
canvas_draw_str(
|
||||
canvas,
|
||||
44 + canvas_string_width(canvas, furi_string_get_cstr(model->frequency_str)) + 1,
|
||||
62,
|
||||
"MHz");
|
||||
const char* str = furi_string_get_cstr(model->preset_str);
|
||||
const uint8_t vertical_offset = 7;
|
||||
const uint8_t horizontal_offset = 3;
|
||||
const uint8_t string_width = canvas_string_width(canvas, str);
|
||||
canvas_draw_str(
|
||||
canvas,
|
||||
canvas_width(canvas) - (string_width + horizontal_offset),
|
||||
vertical_offset,
|
||||
str);
|
||||
} else {
|
||||
canvas_draw_str(canvas, 79, 62, furi_string_get_cstr(model->preset_str));
|
||||
}
|
||||
#else
|
||||
canvas_draw_str(canvas, 79, 62, furi_string_get_cstr(model->preset_str));
|
||||
#endif
|
||||
canvas_draw_str(canvas, 96, 62, furi_string_get_cstr(model->history_stat_str));
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
elements_bold_rounded_frame(canvas, 14, 8, 99, 48);
|
||||
|
||||
Reference in New Issue
Block a user