Fix macro panel in error screen

This commit is contained in:
suchmememanyskill
2024-03-14 18:28:22 +01:00
parent 92d47d8c07
commit 9c958b42b3
2 changed files with 1 additions and 18 deletions

View File

@@ -67,10 +67,7 @@ void macros_draw_power_fullscreen(PRINTER_CONFIG * config)
lv_label_set_text(label, LV_SYMBOL_CLOSE " Close");
lv_obj_center(label);
MACROSQUERY query = macros_query(config);
POWERQUERY power = power_devices_query(config);
macros_add_macros_to_panel(parent, query);
macros_add_power_devices_to_panel(parent, power);
}

View File

@@ -24,21 +24,7 @@ static void btn_click_firmware_restart(lv_event_t * e){
}
void error_ui_macros_open(lv_event_t * e){
lv_obj_t * panel = lv_create_empty_panel(lv_scr_act());
lv_obj_set_style_bg_opa(panel, LV_OPA_COVER, 0);
lv_layout_flex_column(panel);
lv_obj_set_size(panel, CYD_SCREEN_WIDTH_PX, CYD_SCREEN_HEIGHT_PX - CYD_SCREEN_GAP_PX);
lv_obj_align(panel, LV_ALIGN_TOP_LEFT, 0, CYD_SCREEN_GAP_PX);
lv_obj_t * button = lv_btn_create(panel);
lv_obj_set_size(button, CYD_SCREEN_WIDTH_PX - CYD_SCREEN_GAP_PX * 2, CYD_SCREEN_MIN_BUTTON_HEIGHT_PX);
lv_obj_add_event_cb(button, destroy_event_user_data, LV_EVENT_CLICKED, panel);
lv_obj_t * label = lv_label_create(button);
lv_label_set_text(label, LV_SYMBOL_CLOSE " Close");
lv_obj_center(label);
macros_add_power_devices_to_panel(panel, power_devices_query());
macros_draw_power_fullscreen();
}
void error_ui(){