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:
Albert Kharisov
2021-11-26 16:19:30 +04:00
committed by GitHub
parent 6857b98ecd
commit 3ab9112c21
17 changed files with 174 additions and 93 deletions

View File

@@ -19,8 +19,9 @@ void desktop_scene_hw_mismatch_on_enter(void* context) {
furi_hal_version_get_hw_target(),
version_get_target(NULL));
popup_set_context(popup, desktop);
popup_set_header(popup, "!!!! HW Mismatch !!!!", 60, 14, AlignCenter, AlignCenter);
popup_set_text(popup, buffer, 60, 37, AlignCenter, AlignCenter);
popup_set_header(
popup, "!!!! HW Mismatch !!!!", 60, 14 + STATUS_BAR_Y_SHIFT, AlignCenter, AlignCenter);
popup_set_text(popup, buffer, 60, 37 + STATUS_BAR_Y_SHIFT, AlignCenter, AlignCenter);
popup_set_callback(popup, desktop_scene_hw_mismatch_callback);
view_dispatcher_switch_to_view(desktop->view_dispatcher, DesktopViewHwMismatch);
}

View File

@@ -25,8 +25,10 @@ void desktop_scene_locked_on_enter(void* context) {
desktop_animation_set_animation_changed_callback(
desktop->animation, desktop_scene_locked_animation_changed_callback, desktop);
const Icon* icon = desktop_animation_get_animation(desktop->animation);
desktop_locked_set_dolphin_animation(locked_view, icon);
bool status_bar_background_black = false;
const Icon* icon =
desktop_animation_get_animation(desktop->animation, &status_bar_background_black);
desktop_locked_set_dolphin_animation(locked_view, icon, status_bar_background_black);
uint32_t state = scene_manager_get_scene_state(desktop->scene_manager, DesktopViewLocked);
@@ -81,8 +83,11 @@ bool desktop_scene_locked_on_event(void* context, SceneManagerEvent event) {
desktop->pincode_buffer.length = 0;
break;
case DesktopMainEventUpdateAnimation: {
const Icon* icon = desktop_animation_get_animation(desktop->animation);
desktop_locked_set_dolphin_animation(desktop->locked_view, icon);
bool status_bar_background_black = false;
const Icon* icon =
desktop_animation_get_animation(desktop->animation, &status_bar_background_black);
desktop_locked_set_dolphin_animation(
desktop->locked_view, icon, status_bar_background_black);
consumed = true;
break;
}

View File

@@ -54,8 +54,10 @@ void desktop_scene_main_on_enter(void* context) {
desktop_animation_activate(desktop->animation);
desktop_animation_set_animation_changed_callback(
desktop->animation, desktop_scene_main_animation_changed_callback, desktop);
const Icon* icon = desktop_animation_get_animation(desktop->animation);
desktop_main_switch_dolphin_animation(desktop->main_view, icon);
bool status_bar_background_black = false;
const Icon* icon =
desktop_animation_get_animation(desktop->animation, &status_bar_background_black);
desktop_main_switch_dolphin_animation(desktop->main_view, icon, status_bar_background_black);
view_dispatcher_switch_to_view(desktop->view_dispatcher, DesktopViewMain);
}
@@ -92,8 +94,11 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
break;
case DesktopMainEventUpdateAnimation: {
const Icon* icon = desktop_animation_get_animation(desktop->animation);
desktop_main_switch_dolphin_animation(desktop->main_view, icon);
bool status_bar_background_black = false;
const Icon* icon =
desktop_animation_get_animation(desktop->animation, &status_bar_background_black);
desktop_main_switch_dolphin_animation(
desktop->main_view, icon, status_bar_background_black);
consumed = true;
break;
}