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)) {
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));
@ -825,23 +823,26 @@ void Draw_Control_Menu() {
Draw_Menu_Cursor(CSCROL(select_control.now));
// Draw icons and lines
uint8_t i = 0;
#define _TEMP_ICON(N) do{ ++i; if (CVISI(i)) Draw_Menu_Line(CSCROL(i), ICON_Temperature + (N) - 1); }while(0)
#define _TEMP_ICON(N, I, M) do { \
if (CVISI(N)) { \
Draw_Menu_Line(CSCROL(N), I); \
if (M) { \
Draw_More_Icon(CSCROL(N)); \
} \
} \
} while(0)
_TEMP_ICON(CONTROL_CASE_TEMP);
if (CVISI(i)) Draw_More_Icon(CSCROL(i));
_TEMP_ICON(CONTROL_CASE_MOVE);
Draw_More_Icon(CSCROL(i));
_TEMP_ICON(CONTROL_CASE_TEMP, ICON_Temperature, true);
_TEMP_ICON(CONTROL_CASE_MOVE, ICON_Motion, true);
#if ENABLED(EEPROM_SETTINGS)
_TEMP_ICON(CONTROL_CASE_SAVE);
_TEMP_ICON(CONTROL_CASE_LOAD);
_TEMP_ICON(CONTROL_CASE_RESET);
_TEMP_ICON(CONTROL_CASE_SAVE, ICON_WriteEEPROM, false);
_TEMP_ICON(CONTROL_CASE_LOAD, ICON_ReadEEPROM, false);
_TEMP_ICON(CONTROL_CASE_RESET, ICON_ResumeEEPROM, false);
#endif
_TEMP_ICON(CONTROL_CASE_INFO);
if (CVISI(CONTROL_CASE_INFO)) Draw_More_Icon(CSCROL(i));
_TEMP_ICON(CONTROL_CASE_ADVSET, ICON_AdvSet, true);
_TEMP_ICON(CONTROL_CASE_INFO, ICON_Info, true);
}
void Draw_Tune_Menu() {
@ -2653,11 +2654,12 @@ void HMI_Control() {
Scroll_Menu(DWIN_SCROLL_UP);
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);
break;
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;
default: break;
}
@ -2721,7 +2723,7 @@ void HMI_Control() {
HMI_AudioFeedback();
break;
#endif
case CONTROL_CASE_ADVSET: // Advance Settings
case CONTROL_CASE_ADVSET: // Advanced Settings
checkkey = AdvSet;
select_advset.reset();
Draw_AdvSet_Menu();