瀏覽代碼

MKS LVGL UI: Fix icon layout (#21595)

Malderin 3 年之前
父節點
當前提交
76cc736755
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 19 行新增11 行删除
  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 查看文件

@@ -45,7 +45,6 @@
45 45
 #define ICON_POS_Y          38
46 46
 #define TARGET_LABEL_MOD_Y -36
47 47
 #define LABEL_MOD_Y         30
48
-#define SECOND_EXT_MOD_Y   100
49 48
 
50 49
 extern lv_group_t*  g;
51 50
 static lv_obj_t *scr;
@@ -186,24 +185,33 @@ void lv_draw_ready_print() {
186 185
     // Monitoring
187 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 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 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 196
     #endif
197
+
194 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 200
     labelExt1 = lv_label_create(scr, 55, LABEL_MOD_Y, nullptr);
197 201
     labelExt1Target = lv_label_create(scr, 55, LABEL_MOD_Y, nullptr);
198 202
 
199 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 215
     #endif
208 216
 
209 217
     labelFan = lv_label_create(scr, 380, 80, nullptr);

Loading…
取消
儲存