🚸 Fix and improve MKS LVGL UI (#22783)
Co-authored-by: makerbase <4164049@qq.com> Co-authored-by: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@@ -160,8 +160,8 @@ void lv_draw_printing() {
|
||||
|
||||
buttonZpos = lv_imgbtn_create(scr, "F:/bmp_zpos_state.bin", 350, 86, event_handler, ID_BABYSTEP);
|
||||
|
||||
buttonPause = lv_imgbtn_create(scr, uiCfg.print_state == WORKING ? "F:/bmp_pause.bin" : "F:/bmp_resume.bin", 5, 240, event_handler, ID_PAUSE);
|
||||
buttonStop = lv_imgbtn_create(scr, "F:/bmp_stop.bin", 165, 240, event_handler, ID_STOP);
|
||||
buttonPause = lv_imgbtn_create(scr, uiCfg.print_state == WORKING ? "F:/bmp_pause.bin" : "F:/bmp_resume.bin", 5, 240, event_handler, ID_PAUSE);
|
||||
buttonStop = lv_imgbtn_create(scr, "F:/bmp_stop.bin", 165, 240, event_handler, ID_STOP);
|
||||
buttonOperat = lv_imgbtn_create(scr, "F:/bmp_operate.bin", 325, 240, event_handler, ID_OPTION);
|
||||
|
||||
#if HAS_ROTARY_ENCODER
|
||||
@@ -185,7 +185,7 @@ void lv_draw_printing() {
|
||||
labelBed = lv_label_create(scr, 250, 196, nullptr);
|
||||
#endif
|
||||
|
||||
labelFan = lv_label_create(scr, 395, 196, nullptr);
|
||||
labelFan = lv_label_create(scr, 395, 196, nullptr);
|
||||
labelTime = lv_label_create(scr, 250, 96, nullptr);
|
||||
labelZpos = lv_label_create(scr, 395, 96, nullptr);
|
||||
|
||||
@@ -210,8 +210,8 @@ void lv_draw_printing() {
|
||||
lv_bar_set_style(bar1, LV_BAR_STYLE_INDIC, &lv_bar_style_indic);
|
||||
lv_bar_set_anim_time(bar1, 1000);
|
||||
lv_bar_set_value(bar1, 0, LV_ANIM_ON);
|
||||
bar1ValueText = lv_label_create_empty(bar1);
|
||||
lv_label_set_text(bar1ValueText,"0%");
|
||||
bar1ValueText = lv_label_create_empty(bar1);
|
||||
lv_label_set_text(bar1ValueText, "0%");
|
||||
lv_obj_align(bar1ValueText, bar1, LV_ALIGN_CENTER, 0, 0);
|
||||
|
||||
disp_ext_temp();
|
||||
@@ -291,7 +291,7 @@ void setProBarRate() {
|
||||
if (disp_state == PRINTING_UI) {
|
||||
lv_bar_set_value(bar1, rate, LV_ANIM_ON);
|
||||
sprintf_P(public_buf_l, "%d%%", rate);
|
||||
lv_label_set_text(bar1ValueText,public_buf_l);
|
||||
lv_label_set_text(bar1ValueText, public_buf_l);
|
||||
lv_obj_align(bar1ValueText, bar1, LV_ALIGN_CENTER, 0, 0);
|
||||
|
||||
if (marlin_state == MF_SD_COMPLETE) {
|
||||
|
||||
Reference in New Issue
Block a user