Fixed usb pc acm bug.

This commit is contained in:
xiaojiazhu 2023-11-24 09:46:23 +08:00
parent 0151154d73
commit e4b6218cb3
4 changed files with 20 additions and 18 deletions

View File

@ -155,7 +155,7 @@ lv_plugin_string_t lv_plugin_EN_string_table[] = {
{ "Русский", 14 }, /* LV_PLUGIN_STRING_ID_STRID_LANG_RU */
{ "USB", 3 }, /* LV_PLUGIN_STRING_ID_STRID_USB */
{ "PC Mode", 7 }, /* LV_PLUGIN_STRING_ID_STRID_PC_MODE */
{ "Mass Storage", 12 }, /* LV_PLUGIN_STRING_ID_STRID_MSDC */
{ "PC-ACM", 6 }, /* LV_PLUGIN_STRING_ID_STRID_MSDC */
{ "PC Camera", 9 }, /* LV_PLUGIN_STRING_ID_STRID_PCC */
{ "Pictbridge", 10 }, /* LV_PLUGIN_STRING_ID_STRID_PICTBRIDGE */
{ "Power Charging", 14 }, /* LV_PLUGIN_STRING_ID_STRID_USBCHARGE */

View File

@ -6,7 +6,7 @@
{
"children": [
{
"align": "Left",
"align": "Center",
"class": "lv_label",
"click": false,
"drag": false,
@ -14,13 +14,13 @@
"font type": "Font_Type0",
"geometry": {
"height": 20,
"width": 105,
"x": 101,
"width": 320,
"x": 0,
"y": 14
},
"hidden": false,
"locked": false,
"long mode": "Expand",
"long mode": "Roll",
"name": "label_usbmode",
"recolor": false,
"string id": "STRID_MSDC",
@ -60,7 +60,7 @@
"state": 6
}
],
"text": "Mass Storage",
"text": "PC-ACM",
"widget": "Label"
},
{
@ -72,10 +72,10 @@
"geometry": {
"height": 28,
"width": 28,
"x": 139,
"x": -100,
"y": 46
},
"hidden": false,
"hidden": true,
"locked": false,
"name": "image_usb",
"offset": {
@ -125,8 +125,8 @@
"event callback": "",
"geometry": {
"height": 85,
"width": 306,
"x": 6,
"width": 320,
"x": 0,
"y": 91
},
"hidden": false,

View File

@ -422,7 +422,7 @@
"Русский",
"USB",
"PC Mode",
"Mass Storage",
"PC-ACM",
"PC Camera",
"Pictbridge",
"Power Charging",

View File

@ -56,8 +56,8 @@ lv_obj_t* UIFlowUSB_create(){
lv_obj_set_hidden(container_1, false);
lv_obj_set_click(container_1, true);
lv_obj_set_drag(container_1, false);
lv_obj_set_pos(container_1, 6, 91);
lv_obj_set_size(container_1, 306, 85);
lv_obj_set_pos(container_1, 0, 91);
lv_obj_set_size(container_1, 320, 85);
lv_cont_set_layout(container_1, LV_LAYOUT_COLUMN_MID);
lv_obj_add_style(container_1, 0, &container_1_s0);
@ -115,11 +115,13 @@ lv_obj_t* UIFlowUSB_create(){
lv_obj_set_drag(label_usbmode, false);
lv_plugin_label_allocate_ext_attr(label_usbmode);
lv_plugin_label_set_text(label_usbmode, LV_PLUGIN_STRING_ID_STRID_MSDC);
lv_label_set_text(label_usbmode,"Mass Storage");
lv_label_set_text(label_usbmode,"PC-ACM");
lv_plugin_label_allocate_ext_attr(label_usbmode);
lv_plugin_label_set_font_type(label_usbmode, LV_PLUGIN_LANGUAGE_FONT_TYPE_0);
lv_obj_set_pos(label_usbmode, 101, 14);
lv_obj_set_size(label_usbmode, 105, 20);
lv_label_set_align(label_usbmode, LV_LABEL_ALIGN_CENTER);
lv_label_set_long_mode(label_usbmode, LV_LABEL_LONG_SROLL);
lv_obj_set_pos(label_usbmode, 0, 14);
lv_obj_set_size(label_usbmode, 320, 20);
lv_obj_add_style(label_usbmode, 0, &label_usbmode_s0);
label_usbmode_scr_uiflowusb = label_usbmode;
@ -163,10 +165,10 @@ lv_obj_t* UIFlowUSB_create(){
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_outline_color(&image_usb_s0, LV_STATE_DISABLED, color);
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_image_recolor(&image_usb_s0, LV_STATE_DISABLED, color);
lv_obj_t *image_usb = lv_img_create(container_1, NULL);
lv_obj_set_hidden(image_usb, false);
lv_obj_set_hidden(image_usb, true);
lv_obj_set_click(image_usb, false);
lv_obj_set_drag(image_usb, false);
lv_obj_set_pos(image_usb, 139, 46);
lv_obj_set_pos(image_usb, -100, 46);
lv_obj_set_size(image_usb, 28, 28);
lv_img_set_src(image_usb, &icon_usb_on);
lv_obj_add_style(image_usb, 0, &image_usb_s0);