Browse Source

MKS LVGL UI: Fix icon layout (#21595)

Malderin 3 years ago
parent
commit
76cc736755
No account linked to committer's email address
1 changed files with 19 additions and 11 deletions
  1. 19
    11
      Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp

+ 19
- 11
Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp View File

45
 #define ICON_POS_Y          38
45
 #define ICON_POS_Y          38
46
 #define TARGET_LABEL_MOD_Y -36
46
 #define TARGET_LABEL_MOD_Y -36
47
 #define LABEL_MOD_Y         30
47
 #define LABEL_MOD_Y         30
48
-#define SECOND_EXT_MOD_Y   100
49
 
48
 
50
 extern lv_group_t*  g;
49
 extern lv_group_t*  g;
51
 static lv_obj_t *scr;
50
 static lv_obj_t *scr;
186
     // Monitoring
185
     // Monitoring
187
     lv_obj_t *buttonExt1 = lv_big_button_create(scr, "F:/bmp_ext1_state.bin", " ", 55, ICON_POS_Y, event_handler, ID_INFO_EXT);
186
     lv_obj_t *buttonExt1 = lv_big_button_create(scr, "F:/bmp_ext1_state.bin", " ", 55, ICON_POS_Y, event_handler, ID_INFO_EXT);
188
     #if HAS_MULTI_EXTRUDER
187
     #if HAS_MULTI_EXTRUDER
189
-        lv_obj_t *buttonExt2 = lv_big_button_create(scr, "F:/bmp_ext2_state.bin", " ", 55, ICON_POS_Y + SECOND_EXT_MOD_Y, event_handler, ID_INFO_EXT);
190
-    #endif
191
-    #if HAS_HEATED_BED
188
+      lv_obj_t *buttonExt2 = lv_big_button_create(scr, "F:/bmp_ext2_state.bin", " ", 163, ICON_POS_Y, event_handler, ID_INFO_EXT);
189
+      #if HAS_HEATED_BED
190
+        lv_obj_t *buttonBedstate = lv_big_button_create(scr, "F:/bmp_bed_state.bin", " ", 271, ICON_POS_Y, event_handler, ID_INFO_BED);
191
+      #endif
192
+    #else
193
+      #if HAS_HEATED_BED
192
         lv_obj_t *buttonBedstate = lv_big_button_create(scr, "F:/bmp_bed_state.bin", " ", 210, ICON_POS_Y, event_handler, ID_INFO_BED);
194
         lv_obj_t *buttonBedstate = lv_big_button_create(scr, "F:/bmp_bed_state.bin", " ", 210, ICON_POS_Y, event_handler, ID_INFO_BED);
195
+      #endif
193
     #endif
196
     #endif
197
+
194
     lv_obj_t *buttonFanstate = lv_big_button_create(scr, "F:/bmp_fan_state.bin", " ", 380, ICON_POS_Y, event_handler, ID_INFO_FAN);
198
     lv_obj_t *buttonFanstate = lv_big_button_create(scr, "F:/bmp_fan_state.bin", " ", 380, ICON_POS_Y, event_handler, ID_INFO_FAN);
195
 
199
 
196
     labelExt1 = lv_label_create(scr, 55, LABEL_MOD_Y, nullptr);
200
     labelExt1 = lv_label_create(scr, 55, LABEL_MOD_Y, nullptr);
197
     labelExt1Target = lv_label_create(scr, 55, LABEL_MOD_Y, nullptr);
201
     labelExt1Target = lv_label_create(scr, 55, LABEL_MOD_Y, nullptr);
198
 
202
 
199
     #if HAS_MULTI_EXTRUDER
203
     #if HAS_MULTI_EXTRUDER
200
-      labelExt2 = lv_label_create(scr, 55, LABEL_MOD_Y + SECOND_EXT_MOD_Y, nullptr);
201
-      labelExt2Target = lv_label_create(scr, 55, LABEL_MOD_Y + SECOND_EXT_MOD_Y, nullptr);
202
-    #endif
203
-
204
-    #if HAS_HEATED_BED
205
-      labelBed = lv_label_create(scr, 210, LABEL_MOD_Y, nullptr);
206
-      labelBedTarget = lv_label_create(scr, 210, LABEL_MOD_Y, nullptr);
204
+      labelExt2 = lv_label_create(scr, 163, LABEL_MOD_Y, nullptr);
205
+      labelExt2Target = lv_label_create(scr, 163, LABEL_MOD_Y, nullptr);
206
+      #if HAS_HEATED_BED
207
+        labelBed = lv_label_create(scr, 271, LABEL_MOD_Y, nullptr);
208
+        labelBedTarget = lv_label_create(scr, 271, LABEL_MOD_Y, nullptr);
209
+      #endif
210
+    #else
211
+      #if HAS_HEATED_BED
212
+        labelBed = lv_label_create(scr, 210, LABEL_MOD_Y, nullptr);
213
+        labelBedTarget = lv_label_create(scr, 210, LABEL_MOD_Y, nullptr);
214
+      #endif
207
     #endif
215
     #endif
208
 
216
 
209
     labelFan = lv_label_create(scr, 380, 80, nullptr);
217
     labelFan = lv_label_create(scr, 380, 80, nullptr);

Loading…
Cancel
Save