Browse Source

TFT: No timeout on Move Screen (#19426)

vanilla_fb_2.0.x
Victor Oliveira 4 years ago
committed by GitHub
parent
commit
178a1da165
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      Marlin/src/lcd/tft/ui_480x320.cpp

10
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();

Loading…
Cancel
Save