Fix E3V2 Control Menu icon/text order (#21838)

Fixes #21837
This commit is contained in:
Adrian DC 2021-05-08 08:46:21 +02:00 committed by Scott Lahteine
parent ec2f4f512e
commit 83309c1ac8

View File

@ -815,8 +815,6 @@ void Draw_Control_Menu() {
if (CVISI(CONTROL_CASE_ADVSET)) { if (CVISI(CONTROL_CASE_ADVSET)) {
DWIN_Draw_Label(CLINE(CONTROL_CASE_ADVSET), GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // Advanced Settings DWIN_Draw_Label(CLINE(CONTROL_CASE_ADVSET), GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // Advanced Settings
Draw_More_Icon(CSCROL(CONTROL_CASE_ADVSET));
Draw_Menu_Line(CSCROL(CONTROL_CASE_ADVSET), ICON_AdvSet);
} }
if (CVISI(CONTROL_CASE_INFO)) Item_Control_Info(CLINE(CONTROL_CASE_INFO)); if (CVISI(CONTROL_CASE_INFO)) Item_Control_Info(CLINE(CONTROL_CASE_INFO));
@ -825,23 +823,26 @@ void Draw_Control_Menu() {
Draw_Menu_Cursor(CSCROL(select_control.now)); Draw_Menu_Cursor(CSCROL(select_control.now));
// Draw icons and lines // Draw icons and lines
uint8_t i = 0; #define _TEMP_ICON(N, I, M) do { \
#define _TEMP_ICON(N) do{ ++i; if (CVISI(i)) Draw_Menu_Line(CSCROL(i), ICON_Temperature + (N) - 1); }while(0) if (CVISI(N)) { \
Draw_Menu_Line(CSCROL(N), I); \
if (M) { \
Draw_More_Icon(CSCROL(N)); \
} \
} \
} while(0)
_TEMP_ICON(CONTROL_CASE_TEMP); _TEMP_ICON(CONTROL_CASE_TEMP, ICON_Temperature, true);
if (CVISI(i)) Draw_More_Icon(CSCROL(i)); _TEMP_ICON(CONTROL_CASE_MOVE, ICON_Motion, true);
_TEMP_ICON(CONTROL_CASE_MOVE);
Draw_More_Icon(CSCROL(i));
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
_TEMP_ICON(CONTROL_CASE_SAVE); _TEMP_ICON(CONTROL_CASE_SAVE, ICON_WriteEEPROM, false);
_TEMP_ICON(CONTROL_CASE_LOAD); _TEMP_ICON(CONTROL_CASE_LOAD, ICON_ReadEEPROM, false);
_TEMP_ICON(CONTROL_CASE_RESET); _TEMP_ICON(CONTROL_CASE_RESET, ICON_ResumeEEPROM, false);
#endif #endif
_TEMP_ICON(CONTROL_CASE_INFO); _TEMP_ICON(CONTROL_CASE_ADVSET, ICON_AdvSet, true);
if (CVISI(CONTROL_CASE_INFO)) Draw_More_Icon(CSCROL(i)); _TEMP_ICON(CONTROL_CASE_INFO, ICON_Info, true);
} }
void Draw_Tune_Menu() { void Draw_Tune_Menu() {
@ -2653,11 +2654,12 @@ void HMI_Control() {
Scroll_Menu(DWIN_SCROLL_UP); Scroll_Menu(DWIN_SCROLL_UP);
switch (index_control) { // Last menu items switch (index_control) { // Last menu items
case CONTROL_CASE_ADVSET: // Advance Settings > case CONTROL_CASE_ADVSET: // Advanced Settings >
Draw_Menu_Item(MROWS, ICON_AdvSet, GET_TEXT(MSG_ADVANCED_SETTINGS), true); Draw_Menu_Item(MROWS, ICON_AdvSet, GET_TEXT(MSG_ADVANCED_SETTINGS), true);
break; break;
case CONTROL_CASE_INFO: // Info > case CONTROL_CASE_INFO: // Info >
Draw_Menu_Item(MROWS, ICON_Info, GET_TEXT(MSG_INFO_SCREEN), true); Item_Control_Info(MBASE(MROWS));
Draw_Menu_Icon(MROWS, ICON_Info);
break; break;
default: break; default: break;
} }
@ -2721,7 +2723,7 @@ void HMI_Control() {
HMI_AudioFeedback(); HMI_AudioFeedback();
break; break;
#endif #endif
case CONTROL_CASE_ADVSET: // Advance Settings case CONTROL_CASE_ADVSET: // Advanced Settings
checkkey = AdvSet; checkkey = AdvSet;
select_advset.reset(); select_advset.reset();
Draw_AdvSet_Menu(); Draw_AdvSet_Menu();