Skip to content

Commit

Permalink
TFT: No timeout on Move Screen (MarlinFirmware#19426)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhapsodyv authored and vgadreau committed Dec 9, 2020
1 parent 35040ef commit 22a6b5d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Marlin/src/lcd/tft/ui_480x320.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();

Expand Down

0 comments on commit 22a6b5d

Please sign in to comment.