Fix out of screen drawings (#842)
* Fix lock screen menu * Fix pin setup in lock menu * Desktop GUI layer on FS, black status bar * Desktop: fix spelling * Fix first start screen * Fix status bar drawing Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -275,11 +275,14 @@ static void code_input_handle_dpad(CodeInputModel* model, InputKey key) {
|
||||
static void code_input_view_draw_callback(Canvas* canvas, void* _model) {
|
||||
CodeInputModel* model = _model;
|
||||
uint8_t y_offset = 0;
|
||||
if(!strlen(model->header)) y_offset = 5;
|
||||
canvas_clear(canvas);
|
||||
canvas_set_color(canvas, ColorBlack);
|
||||
|
||||
canvas_draw_str(canvas, 2, 9, model->header);
|
||||
if(model->header && strlen(model->header)) {
|
||||
canvas_draw_str(canvas, 2, 9, model->header);
|
||||
} else {
|
||||
y_offset = 4;
|
||||
}
|
||||
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
|
||||
@@ -290,7 +293,7 @@ static void code_input_view_draw_callback(Canvas* canvas, void* _model) {
|
||||
model->local_buffer[CodeInputFirst],
|
||||
model->input_length[CodeInputFirst],
|
||||
6,
|
||||
30 - y_offset,
|
||||
30 + y_offset,
|
||||
true);
|
||||
break;
|
||||
case CodeInputStateUpdate:
|
||||
@@ -299,14 +302,14 @@ static void code_input_view_draw_callback(Canvas* canvas, void* _model) {
|
||||
model->local_buffer[CodeInputFirst],
|
||||
model->input_length[CodeInputFirst],
|
||||
6,
|
||||
14 - y_offset,
|
||||
14 + y_offset,
|
||||
!model->current);
|
||||
code_input_draw_sequence(
|
||||
canvas,
|
||||
model->local_buffer[CodeInputSecond],
|
||||
model->input_length[CodeInputSecond],
|
||||
6,
|
||||
44 - y_offset,
|
||||
44 + y_offset,
|
||||
model->current);
|
||||
|
||||
if(model->current) canvas_draw_str(canvas, 2, 39 - y_offset, "Repeat code");
|
||||
|
Reference in New Issue
Block a user