Skip to content

Commit

Permalink
Fix E3V2 Control Menu icon/text order (#21838)
Browse files Browse the repository at this point in the history
Fixes #21837
  • Loading branch information
AdrianDC authored May 8, 2021
1 parent 0174157 commit 57025b7
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions Marlin/src/lcd/dwin/e3v2/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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)

_TEMP_ICON(CONTROL_CASE_TEMP);
if (CVISI(i)) Draw_More_Icon(CSCROL(i));

_TEMP_ICON(CONTROL_CASE_MOVE);
Draw_More_Icon(CSCROL(i));
#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, 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() {
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 57025b7

Please sign in to comment.