From 83309c1ac825fa863f660f37d0218c6305ad7845 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Sat, 8 May 2021 08:46:21 +0200 Subject: [PATCH] Fix E3V2 Control Menu icon/text order (#21838) Fixes #21837 --- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 38 ++++++++++++++++--------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index dc729263db..620b267bd2 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -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) - - _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() { @@ -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();