fix ipv6 address truncation

This commit is contained in:
Siyuan Miao 2025-09-25 13:05:50 +00:00 committed by Siyuan
parent 84a28454f4
commit 9bd3436536
3 changed files with 15 additions and 7 deletions

View File

@ -1251,7 +1251,7 @@
"type": "LVGLLabelWidget",
"left": 0,
"top": 0,
"width": 194,
"width": 98,
"height": 17,
"customInputs": [],
"customOutputs": [],
@ -1266,8 +1266,8 @@
"identifier": "HomeInfoIPv6Addr",
"leftUnit": "%",
"topUnit": "%",
"widthUnit": "content",
"heightUnit": "content",
"widthUnit": "%",
"heightUnit": "px",
"children": [],
"widgetFlags": "CLICK_FOCUSABLE|GESTURE_BUBBLE|PRESS_LOCK|SCROLLABLE|SCROLL_CHAIN_HOR|SCROLL_CHAIN_VER|SCROLL_ELASTIC|SCROLL_MOMENTUM|SCROLL_WITH_ARROW|SNAPPABLE",
"hiddenFlagType": "literal",
@ -1277,10 +1277,17 @@
"states": "",
"useStyle": "LabelFont16",
"localStyles": {
"objID": "64467adf-a093-484d-b5cf-b70c5be5264f"
"objID": "64467adf-a093-484d-b5cf-b70c5be5264f",
"definition": {
"MAIN": {
"DEFAULT": {
"text_align": "LEFT"
}
}
}
},
"groupIndex": 0,
"text": "fe80::ffff:ffff:ffff:ffff:ffff:ffff",
"text": "fe80::ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
"textType": "literal",
"longMode": "DOT",
"recolor": false

View File

@ -325,10 +325,11 @@ void create_screen_home_screen() {
lv_obj_t *obj = lv_label_create(parent_obj);
objects.home_info_ipv6_addr = obj;
lv_obj_set_pos(obj, LV_PCT(0), LV_PCT(0));
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_size(obj, LV_PCT(98), 17);
lv_label_set_long_mode(obj, LV_LABEL_LONG_DOT);
add_style_label_font16(obj);
lv_label_set_text(obj, "fe80::ffff:ffff:ffff:ffff:ffff:ffff");
lv_obj_set_style_text_align(obj, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "fe80::ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff");
}
{
// HomeInfoMACAddr

Binary file not shown.