mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 13:43:25 +00:00
Reorder settings
This commit is contained in:
@@ -214,6 +214,13 @@ void settings_panel_init(lv_obj_t* panel){
|
|||||||
create_settings_widget("Wake Timeout", dropdown, panel);
|
create_settings_widget("Wake Timeout", dropdown, panel);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
dropdown = lv_dropdown_create(panel);
|
||||||
|
lv_dropdown_set_options(dropdown, estimated_time_options);
|
||||||
|
lv_obj_add_event_cb(dropdown, estimated_time_dropdown, LV_EVENT_VALUE_CHANGED, NULL);
|
||||||
|
|
||||||
|
lv_dropdown_set_selected(dropdown, global_config.remaining_time_calc_mode);
|
||||||
|
create_settings_widget("Estimated Time", dropdown, panel);
|
||||||
|
|
||||||
toggle = lv_switch_create(panel);
|
toggle = lv_switch_create(panel);
|
||||||
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
|
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
|
||||||
lv_obj_add_event_cb(toggle, rotate_screen_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
lv_obj_add_event_cb(toggle, rotate_screen_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
||||||
@@ -234,6 +241,15 @@ void settings_panel_init(lv_obj_t* panel){
|
|||||||
create_settings_widget("Screen On During Print", toggle, panel);
|
create_settings_widget("Screen On During Print", toggle, panel);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
toggle = lv_switch_create(panel);
|
||||||
|
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
|
||||||
|
lv_obj_add_event_cb(toggle, auto_ota_update_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
||||||
|
|
||||||
|
if (global_config.autoOtaUpdate)
|
||||||
|
lv_obj_add_state(toggle, LV_STATE_CHECKED);
|
||||||
|
|
||||||
|
create_settings_widget("Auto Update", toggle, panel);
|
||||||
|
|
||||||
label = lv_label_create(panel);
|
label = lv_label_create(panel);
|
||||||
lv_label_set_text(label, REPO_VERSION " ");
|
lv_label_set_text(label, REPO_VERSION " ");
|
||||||
|
|
||||||
@@ -255,20 +271,4 @@ void settings_panel_init(lv_obj_t* panel){
|
|||||||
|
|
||||||
create_settings_widget("Device", label, panel, false);
|
create_settings_widget("Device", label, panel, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle = lv_switch_create(panel);
|
|
||||||
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
|
|
||||||
lv_obj_add_event_cb(toggle, auto_ota_update_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
|
||||||
|
|
||||||
if (global_config.autoOtaUpdate)
|
|
||||||
lv_obj_add_state(toggle, LV_STATE_CHECKED);
|
|
||||||
|
|
||||||
create_settings_widget("Auto Update", toggle, panel);
|
|
||||||
|
|
||||||
dropdown = lv_dropdown_create(panel);
|
|
||||||
lv_dropdown_set_options(dropdown, estimated_time_options);
|
|
||||||
lv_obj_add_event_cb(dropdown, estimated_time_dropdown, LV_EVENT_VALUE_CHANGED, NULL);
|
|
||||||
|
|
||||||
lv_dropdown_set_selected(dropdown, global_config.remaining_time_calc_mode);
|
|
||||||
create_settings_widget("Estimated Time", dropdown, panel);
|
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,6 @@ void temp_panel_init(lv_obj_t * panel){
|
|||||||
lv_layout_flex_column(root_temp_panel);
|
lv_layout_flex_column(root_temp_panel);
|
||||||
lv_obj_set_flex_align(root_temp_panel, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_END, LV_FLEX_ALIGN_CENTER);
|
lv_obj_set_flex_align(root_temp_panel, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_END, LV_FLEX_ALIGN_CENTER);
|
||||||
lv_obj_set_scrollbar_mode(root_temp_panel, LV_SCROLLBAR_MODE_OFF);
|
lv_obj_set_scrollbar_mode(root_temp_panel, LV_SCROLLBAR_MODE_OFF);
|
||||||
lv_obj_clear_flag(root_temp_panel, LV_OBJ_FLAG_SCROLL_ELASTIC);
|
|
||||||
|
|
||||||
lv_obj_t * chart = lv_chart_create(root_temp_panel);
|
lv_obj_t * chart = lv_chart_create(root_temp_panel);
|
||||||
lv_obj_set_size(chart, element_width - CYD_SCREEN_MIN_BUTTON_WIDTH_PX, CYD_SCREEN_MIN_BUTTON_HEIGHT_PX * 3);
|
lv_obj_set_size(chart, element_width - CYD_SCREEN_MIN_BUTTON_WIDTH_PX, CYD_SCREEN_MIN_BUTTON_HEIGHT_PX * 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user