Skip to content

Commit fbe9237

Browse files
authored
🐛 Fix TFT touch buttons, button colors (MarlinFirmware#25300)
1 parent d6f4f24 commit fbe9237

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

Marlin/src/inc/Conditionals_LCD.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1611,9 +1611,9 @@
16111611
#endif
16121612
#if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272)
16131613
#if ENABLED(TFT_COLOR_UI_PORTRAIT)
1614-
#define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7) // Fewer lines with touch buttons onscreen
1615-
#else
16161614
#define LCD_HEIGHT TERN(TOUCH_SCREEN, 8, 9) // Fewer lines with touch buttons onscreen
1615+
#else
1616+
#define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7) // Fewer lines with touch buttons onscreen
16171617
#endif
16181618
#elif HAS_UI_1024x600
16191619
#define LCD_HEIGHT TERN(TOUCH_SCREEN, 12, 13) // Fewer lines with touch buttons onscreen

Marlin/src/lcd/tft/tft_color.h

+13
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,16 @@
178178
#ifndef COLOR_KILL_SCREEN_TEXT
179179
#define COLOR_KILL_SCREEN_TEXT COLOR_WHITE
180180
#endif
181+
182+
#ifndef E_BTN_COLOR
183+
#define E_BTN_COLOR COLOR_YELLOW
184+
#endif
185+
#ifndef X_BTN_COLOR
186+
#define X_BTN_COLOR COLOR_CORAL_RED
187+
#endif
188+
#ifndef Y_BTN_COLOR
189+
#define Y_BTN_COLOR COLOR_VIVID_GREEN
190+
#endif
191+
#ifndef Z_BTN_COLOR
192+
#define Z_BTN_COLOR COLOR_LIGHT_BLUE
193+
#endif

Marlin/src/lcd/tft/ui_1024x600.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,6 @@ struct MotionAxisState {
592592

593593
MotionAxisState motionAxisState;
594594

595-
#define E_BTN_COLOR COLOR_YELLOW
596-
#define X_BTN_COLOR COLOR_CORAL_RED
597-
#define Y_BTN_COLOR COLOR_VIVID_GREEN
598-
#define Z_BTN_COLOR COLOR_LIGHT_BLUE
599-
600595
#define BTN_WIDTH 64
601596
#define BTN_HEIGHT 52
602597
#define X_MARGIN 20

Marlin/src/lcd/tft/ui_320x240.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -674,11 +674,6 @@ struct MotionAxisState {
674674

675675
MotionAxisState motionAxisState;
676676

677-
#define E_BTN_COLOR COLOR_YELLOW
678-
#define X_BTN_COLOR COLOR_CORAL_RED
679-
#define Y_BTN_COLOR COLOR_VIVID_GREEN
680-
#define Z_BTN_COLOR COLOR_LIGHT_BLUE
681-
682677
#define BTN_WIDTH 48
683678
#define BTN_HEIGHT 39
684679
#define X_MARGIN 15

Marlin/src/lcd/tft/ui_480x320.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,6 @@ struct MotionAxisState {
573573

574574
MotionAxisState motionAxisState;
575575

576-
#define E_BTN_COLOR COLOR_YELLOW
577-
#define X_BTN_COLOR COLOR_CORAL_RED
578-
#define Y_BTN_COLOR COLOR_VIVID_GREEN
579-
#define Z_BTN_COLOR COLOR_LIGHT_BLUE
580-
581576
#define BTN_WIDTH 64
582577
#define BTN_HEIGHT 52
583578
#define X_MARGIN 20

0 commit comments

Comments
 (0)