Skip to content

Commit

Permalink
🚸 Update LCD Manual Leveling display (MarlinFirmware#26088)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasradek authored and EvilGremlin committed Oct 26, 2023
1 parent 436c193 commit e5e7965
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void MarlinUI::draw_status_message(const bool blink) {
const dwin_coord_t by = (row * MENU_LINE_HEIGHT) + MENU_FONT_HEIGHT + EXTRA_ROW_HEIGHT / 2;
dwinDrawString(true, font16x32, COLOR_YELLOW, COLOR_BG_BLACK, (LCD_PIXEL_WIDTH - vallen * 16) / 2, by, S(dwin_string.string()));

if (ui.can_show_slider()) {
if (ui.can_show_slider() && maxEditValue > 0) {

const dwin_coord_t slider_length = LCD_PIXEL_WIDTH - TERN(DWIN_MARLINUI_LANDSCAPE, 120, 20),
slider_height = 16,
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/menu/menu_bed_leveling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
void _lcd_level_bed_moving() {
if (ui.should_draw()) {
MString<9> msg;
msg.setf(F("%i / %u"), int(manual_probe_index + 1), total_probe_points);
MenuEditItemBase::draw_edit_screen(GET_TEXT_F(MSG_LEVEL_BED_NEXT_POINT), &msg);
msg.setf(F(" %i / %u"), int(manual_probe_index + 1), total_probe_points);
MenuItem_static::draw(LCD_HEIGHT / 2, GET_TEXT_F(MSG_LEVEL_BED_NEXT_POINT), SS_CENTER, msg);
}
ui.refresh(LCDVIEW_CALL_NO_REDRAW);
if (!ui.wait_for_move) ui.goto_screen(_lcd_level_bed_get_z);
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/menu/menu_x_twist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ void xatc_wizard_menu() {
void xatc_wizard_moving() {
if (ui.should_draw()) {
MString<9> msg;
msg.setf(F("%i / %u"), manual_probe_index + 1, XATC_MAX_POINTS);
MenuEditItemBase::draw_edit_screen(GET_TEXT_F(MSG_LEVEL_BED_NEXT_POINT), &msg);
msg.setf(F(" %i / %u"), manual_probe_index + 1, XATC_MAX_POINTS);
MenuItem_static::draw(LCD_HEIGHT / 2, GET_TEXT_F(MSG_LEVEL_BED_NEXT_POINT), SS_CENTER, msg);
}
ui.refresh(LCDVIEW_CALL_NO_REDRAW);
if (!ui.wait_for_move) ui.goto_screen(xatc_wizard_menu);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/tft/ui_color_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void MenuEditItemBase::draw_edit_screen(FSTR_P const fstr, const char * const va
}
#endif

if (ui.can_show_slider()) {
if (ui.can_show_slider() && maxEditValue > 0) {
tft.canvas((TFT_WIDTH - SLIDER_W) / 2, SLIDER_Y, SLIDER_W, 16);
tft.set_background(COLOR_BACKGROUND);

Expand Down

0 comments on commit e5e7965

Please sign in to comment.