将屏幕背景改为了灰色

This commit is contained in:
jarvis 2025-03-03 23:07:02 +08:00
parent 814232fa3f
commit bdd076a5d3
7 changed files with 49 additions and 28 deletions

File diff suppressed because one or more lines are too long

View File

@ -2077,7 +2077,8 @@
"InheritedType": 4
}
],
"saved_objtypeKey": "PANEL"
"saved_objtypeKey": "PANEL",
"tree_closed": true
}
],
"dont_export": false,
@ -2117,8 +2118,8 @@
"flags": 17,
"strtype": "OBJECT/Position",
"intarray": [
324,
5
323,
9
],
"InheritedType": 7
},
@ -2279,8 +2280,8 @@
"flags": 17,
"strtype": "OBJECT/Position",
"intarray": [
2,
-96
-4,
1
],
"InheritedType": 7
},
@ -2457,7 +2458,7 @@
"strtype": "OBJECT/Size",
"intarray": [
300,
320
71
],
"InheritedType": 7
},
@ -2574,8 +2575,7 @@
"InheritedType": 11
}
],
"saved_objtypeKey": "PANEL",
"tree_closed": true
"saved_objtypeKey": "PANEL"
}
],
"dont_export": false,
@ -3387,12 +3387,13 @@
"InheritedType": 11
}
],
"saved_objtypeKey": "PANEL"
"saved_objtypeKey": "PANEL",
"tree_closed": true
}
],
"isPage": true,
"editor_posx": 400,
"editor_posy": -400,
"editor_posy": -1000,
"dont_export": false,
"locked": false,
"properties": [
@ -3503,6 +3504,17 @@
"strtype": "_style/Bg_Image_opa",
"integer": 255,
"InheritedType": 6
},
{
"nid": 10630,
"strtype": "_style/Bg_Image_Recolor",
"intarray": [
151,
151,
156,
255
],
"InheritedType": 7
}
],
"InheritedType": 1
@ -3768,7 +3780,8 @@
"InheritedType": 4
}
],
"saved_objtypeKey": "IMAGE"
"saved_objtypeKey": "IMAGE",
"tree_closed": true
},
{
"guid": "GUID81745236-1060294S3422337",
@ -4157,7 +4170,8 @@
"InheritedType": 4
}
],
"saved_objtypeKey": "PANEL"
"saved_objtypeKey": "PANEL",
"tree_closed": true
},
{
"guid": "GUID8864257-1060858S9202337",
@ -5368,8 +5382,7 @@
"InheritedType": 4
}
],
"saved_objtypeKey": "PANEL",
"tree_closed": true
"saved_objtypeKey": "PANEL"
}
],
"dont_export": false,
@ -5639,7 +5652,7 @@
}
],
"isPage": true,
"editor_posx": 800,
"editor_posx": 1120,
"editor_posy": -400,
"dont_export": false,
"locked": false,
@ -8133,7 +8146,7 @@
}
],
"isPage": true,
"editor_posx": 1200,
"editor_posx": 1500,
"editor_posy": -400,
"dont_export": false,
"locked": false,
@ -8359,10 +8372,10 @@
"theme_dark": false,
"theme_color1": 5,
"theme_color2": 0,
"uiExportFolderPath": "",
"uiExportFolderPath": "E:\\FluxDC\\SquareLineProj\\Export",
"projectExportFolderPath": "E:\\workplace\\SquareLine_workplace\\WUI\\ESP32S3_UI",
"custom_variable_prefix": "uic",
"backup_cnt": 39,
"backup_cnt": 40,
"autosave_cnt": 0,
"group_color_cnt": 0,
"lvgl_version": "8.3.6",

View File

@ -11,6 +11,8 @@ void ui_Home_screen_init(void)
lv_obj_clear_flag(ui_Home, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_img_src(ui_Home, &ui_img_1623594766, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_opa(ui_Home, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_recolor(ui_Home, lv_color_hex(0x97979C), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_recolor_opa(ui_Home, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_header = lv_obj_create(ui_Home);
lv_obj_set_width(ui_header, 320);
@ -177,7 +179,7 @@ void ui_Home_screen_init(void)
ui_home2 = lv_obj_create(ui_Body);
lv_obj_set_width(ui_home2, 300);
lv_obj_set_height(ui_home2, 320);
lv_obj_set_height(ui_home2, 65);
lv_obj_set_align(ui_home2, LV_ALIGN_TOP_MID);
lv_obj_clear_flag(ui_home2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_radius(ui_home2, 50, LV_PART_MAIN | LV_STATE_DEFAULT);
@ -190,8 +192,8 @@ void ui_Home_screen_init(void)
ui_Label1 = lv_label_create(ui_home2);
lv_obj_set_width(ui_Label1, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label1, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label1, 2);
lv_obj_set_y(ui_Label1, -96);
lv_obj_set_x(ui_Label1, -4);
lv_obj_set_y(ui_Label1, 1);
lv_obj_set_align(ui_Label1, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label1, "12:30");
lv_obj_set_style_text_color(ui_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);

Binary file not shown.

View File

@ -11,6 +11,8 @@ void ui_Home_screen_init(void)
lv_obj_clear_flag(ui_Home, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_img_src(ui_Home, &ui_img_1623594766, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_opa(ui_Home, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_recolor(ui_Home, lv_color_hex(0x97979C), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_recolor_opa(ui_Home, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_header = lv_obj_create(ui_Home);
lv_obj_set_width(ui_header, 320);
@ -177,7 +179,7 @@ void ui_Home_screen_init(void)
ui_home2 = lv_obj_create(ui_Body);
lv_obj_set_width(ui_home2, 300);
lv_obj_set_height(ui_home2, 320);
lv_obj_set_height(ui_home2, 65);
lv_obj_set_align(ui_home2, LV_ALIGN_TOP_MID);
lv_obj_clear_flag(ui_home2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_radius(ui_home2, 50, LV_PART_MAIN | LV_STATE_DEFAULT);
@ -190,8 +192,8 @@ void ui_Home_screen_init(void)
ui_Label1 = lv_label_create(ui_home2);
lv_obj_set_width(ui_Label1, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label1, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label1, 2);
lv_obj_set_y(ui_Label1, -96);
lv_obj_set_x(ui_Label1, -4);
lv_obj_set_y(ui_Label1, 1);
lv_obj_set_align(ui_Label1, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label1, "12:30");
lv_obj_set_style_text_color(ui_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);

View File

@ -66,7 +66,7 @@ static const char *TAG = "example";
#define EXAMPLE_LVGL_TICK_PERIOD_MS 2
#define EXAMPLE_LVGL_TASK_MAX_DELAY_MS 500
#define EXAMPLE_LVGL_TASK_MIN_DELAY_MS 1
#define EXAMPLE_LVGL_TASK_STACK_SIZE (4 * 1024)
#define EXAMPLE_LVGL_TASK_STACK_SIZE (16 * 1024)
#define EXAMPLE_LVGL_TASK_PRIORITY 2
#define EXAMPLE_DMA_BURST_SIZE 64 // 16, 32, 64. Higher burst size can improve the performance when the DMA buffer comes from PSRAM
@ -396,10 +396,14 @@ void app_main(void)
xTaskCreate(example_lvgl_port_task, "LVGL", EXAMPLE_LVGL_TASK_STACK_SIZE, NULL, EXAMPLE_LVGL_TASK_PRIORITY, NULL);
ESP_LOGI(TAG, "Display LVGL animation");
// Lock the mutex due to the LVGL APIs are not thread-safe
if (example_lvgl_lock(-1)) {
//example_lvgl_demo_ui(disp);
ui_init();
// Release the mutex
example_lvgl_unlock();
}