Skip to content

Commit 4d52a59

Browse files
alexgrachAndy-Big
authored andcommitted
🐛 Fix TFT touch buttons, button colors (MarlinFirmware#25300)
1 parent c190ab8 commit 4d52a59

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-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

+12
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,15 @@
218218
#define COLOR_KILL_SCREEN_TEXT COLOR_WHITE
219219
#endif
220220

221+
#ifndef E_BTN_COLOR
222+
#define E_BTN_COLOR COLOR_YELLOW
223+
#endif
224+
#ifndef X_BTN_COLOR
225+
#define X_BTN_COLOR COLOR_CORAL_RED
226+
#endif
227+
#ifndef Y_BTN_COLOR
228+
#define Y_BTN_COLOR COLOR_VIVID_GREEN
229+
#endif
230+
#ifndef Z_BTN_COLOR
231+
#define Z_BTN_COLOR COLOR_LIGHT_BLUE
232+
#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
@@ -606,11 +606,6 @@ struct MotionAxisState {
606606

607607
MotionAxisState motionAxisState;
608608

609-
#define E_BTN_COLOR COLOR_YELLOW
610-
#define X_BTN_COLOR COLOR_CORAL_RED
611-
#define Y_BTN_COLOR COLOR_VIVID_GREEN
612-
#define Z_BTN_COLOR COLOR_LIGHT_BLUE
613-
614609
#define BTN_WIDTH 48
615610
#define BTN_HEIGHT 39
616611
#define X_MARGIN 15

Marlin/src/lcd/tft/ui_480x320.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -863,11 +863,6 @@ struct MotionAxisState {
863863

864864
MotionAxisState motionAxisState;
865865

866-
#define E_BTN_COLOR COLOR_YELLOW
867-
#define X_BTN_COLOR COLOR_CORAL_RED
868-
#define Y_BTN_COLOR COLOR_VIVID_GREEN
869-
#define Z_BTN_COLOR COLOR_LIGHT_BLUE
870-
871866
#define BTN_WIDTH 64
872867
#define BTN_HEIGHT 52
873868
#define X_MARGIN 20

0 commit comments

Comments
 (0)