From 3d521a2e34a4ed8057f22b809b0869126669ac9f 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 b5b332910b..ffc619e8dc 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();