From 178a1da165162f59a8a4a98d038ac4d2eef6c674 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Fri, 25 Sep 2020 16:58:28 -0300 Subject: [PATCH] TFT: No timeout on Move Screen (#19426) --- Marlin/src/lcd/tft/ui_480x320.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index b5b332910..ffc619e8d 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -956,24 +956,17 @@ static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage i uint16_t width = Images[imgBtn52Rounded].width; uint16_t height = Images[imgBtn52Rounded].height; - tft.queue.sync(); //need sync to change font - if (!enabled) bgColor = COLOR_CONTROL_DISABLED; tft.canvas(x, y, width, height); tft.set_background(COLOR_BACKGROUND); tft.add_image(0, 0, imgBtn52Rounded, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); + // TODO: Make an add_text() taking a font arg if (label != NULL) { - tft.set_font(Helvetica12Bold); - tft_string.set_font(Helvetica12Bold); tft_string.set(label); tft_string.trim(); tft.add_text(tft_string.center(width), height / 2 - tft_string.font_height() / 2, bgColor, tft_string); - - tft.queue.sync(); - tft_string.set_font(Helvetica18); - tft.set_font(Helvetica18); } else { tft.add_image(0, 0, img, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); @@ -984,6 +977,7 @@ static void drawBtn(int x, int y, const char* label, int32_t data, MarlinImage i void MarlinUI::move_axis_screen() { // Reset + defer_status_screen(true); motionAxisState.blocked = false; touch.enable();