mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-15 01:08:35 -07:00
Remove unused code
This commit is contained in:
@@ -39,12 +39,6 @@ static void desktop_lock_icon_draw_callback(Canvas* canvas, void* context) {
|
||||
canvas_draw_icon(canvas, 0, 0, &I_Lock_8x8);
|
||||
}
|
||||
|
||||
static void desktop_sfw_mode_icon_draw_callback(Canvas* canvas, void* context) {
|
||||
UNUSED(context);
|
||||
furi_assert(canvas);
|
||||
canvas_draw_icon(canvas, 0, 0, &I_GameMode_11x8);
|
||||
}
|
||||
|
||||
static bool desktop_custom_event_callback(void* context, uint32_t event) {
|
||||
furi_assert(context);
|
||||
Desktop* desktop = (Desktop*)context;
|
||||
@@ -149,7 +143,6 @@ void desktop_unlock(Desktop* desktop) {
|
||||
}
|
||||
|
||||
void desktop_set_sfw_mode_state(Desktop* desktop, bool enabled) {
|
||||
view_port_enabled_set(desktop->sfw_mode_icon_viewport, enabled);
|
||||
desktop->settings.sfw_mode = enabled;
|
||||
DESKTOP_SETTINGS_SAVE(&desktop->settings);
|
||||
animation_manager_new_idle_process(desktop->animation_manager);
|
||||
@@ -238,14 +231,6 @@ Desktop* desktop_alloc() {
|
||||
view_port_enabled_set(desktop->lock_icon_viewport, false);
|
||||
gui_add_view_port(desktop->gui, desktop->lock_icon_viewport, GuiLayerStatusBarLeft);
|
||||
|
||||
// Dummy mode icon
|
||||
desktop->sfw_mode_icon_viewport = view_port_alloc();
|
||||
view_port_set_width(desktop->sfw_mode_icon_viewport, icon_get_width(&I_GameMode_11x8));
|
||||
view_port_draw_callback_set(
|
||||
desktop->sfw_mode_icon_viewport, desktop_sfw_mode_icon_draw_callback, desktop);
|
||||
view_port_enabled_set(desktop->sfw_mode_icon_viewport, false);
|
||||
gui_add_view_port(desktop->gui, desktop->sfw_mode_icon_viewport, GuiLayerStatusBarLeft);
|
||||
|
||||
// Special case: autostart application is already running
|
||||
desktop->loader = furi_record_open(RECORD_LOADER);
|
||||
if (loader_is_locked(desktop->loader) &&
|
||||
@@ -342,7 +327,6 @@ int32_t desktop_srv(void* p) {
|
||||
DESKTOP_SETTINGS_SAVE(&desktop->settings);
|
||||
}
|
||||
|
||||
view_port_enabled_set(desktop->sfw_mode_icon_viewport, desktop->settings.sfw_mode);
|
||||
desktop_main_set_sfw_mode_state(desktop->main_view, desktop->settings.sfw_mode);
|
||||
|
||||
scene_manager_next_scene(desktop->scene_manager, DesktopSceneMain);
|
||||
|
||||
@@ -58,7 +58,6 @@ struct Desktop {
|
||||
DesktopViewPinInput* pin_input_view;
|
||||
|
||||
ViewPort* lock_icon_viewport;
|
||||
ViewPort* sfw_mode_icon_viewport;
|
||||
|
||||
AnimationManager* animation_manager;
|
||||
|
||||
|
||||
@@ -116,41 +116,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
canvas_height(gui->canvas) - 4);
|
||||
}
|
||||
|
||||
// Left side
|
||||
x = 2;
|
||||
ViewPortArray_it(it, gui->layers[GuiLayerStatusBarLeft]);
|
||||
while(!ViewPortArray_end_p(it) && (right_used + left_used) < GUI_STATUS_BAR_WIDTH) {
|
||||
ViewPort* view_port = *ViewPortArray_ref(it);
|
||||
if(view_port_is_enabled(view_port)) {
|
||||
width = view_port_get_width(view_port);
|
||||
if(!width) width = 8;
|
||||
// Prepare work area background
|
||||
canvas_frame_set(
|
||||
gui->canvas,
|
||||
x - 1,
|
||||
// SASQUACH SAYS : This is the white box behind the left bar, move it 64 to hide it
|
||||
GUI_STATUS_BAR_Y + 64,
|
||||
width + 2,
|
||||
GUI_STATUS_BAR_WORKAREA_HEIGHT + 2);
|
||||
canvas_set_color(gui->canvas, ColorWhite);
|
||||
canvas_draw_box(
|
||||
gui->canvas, 0, 0, canvas_width(gui->canvas), canvas_height(gui->canvas));
|
||||
canvas_set_color(gui->canvas, ColorBlack);
|
||||
// ViewPort draw
|
||||
canvas_frame_set(
|
||||
// SASQUACH SAYS : This is where you move the Icons for the left bar, 64 to hide it
|
||||
gui->canvas,
|
||||
x,
|
||||
GUI_STATUS_BAR_Y + 64,
|
||||
width,
|
||||
GUI_STATUS_BAR_WORKAREA_HEIGHT);
|
||||
view_port_draw(view_port, gui->canvas);
|
||||
// Recalculate next position
|
||||
left_used += (width + 2);
|
||||
x += (width + 2);
|
||||
}
|
||||
ViewPortArray_next(it);
|
||||
}
|
||||
|
||||
// Extra notification
|
||||
if(need_attention) {
|
||||
width = icon_get_width(&I_Hidden_window_9x8);
|
||||
|
||||
Reference in New Issue
Block a user