From: @CHENG <2393524978@qq.com> Date: Mon, 15 Jan 2024 09:11:19 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=4d87cb4eb38b7b31377fe87038c986cf3c80acbc;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c index 5bcb44d2..ba1ec1a6 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c @@ -6,8 +6,9 @@ static lv_signal_cb_t ancient_scrl_signal; -static uint8_t s_wechat_msg_init_flag = 0; -static nv_watch_wechat_msg_info_t * s_wechat_msg_info = NULL; +//static uint8_t s_wechat_msg_init_flag = 0; +static nv_watch_wechat_msg_info_t s_wechat_msg_info_t = {0}; +static nv_watch_wechat_msg_info_t * s_wechat_msg_info = &s_wechat_msg_info_t; static nv_watch_wechat_msg_item_info_t s_wechat_msg_item_info = {0}; static uint8_t s_wechat_play_anim_count = 0; static char s_wechat_selected_item_index = -1; @@ -28,6 +29,16 @@ void wechat_msg_info_nv_write(void) void mmi_wechat_msg_info_init(void) { +#if 1 + uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); + + if(nv_data_length != UI_NV_Read_Req(NV_SECTION_UI_WEHAT_MSG, 0, nv_data_length, (uint8_t *)s_wechat_msg_info)) + { + WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: NV_SECTION_UI_WEHAT_MSG read fail\n", __FUNCTION__, __LINE__); + _lv_memset_00(s_wechat_msg_info, nv_data_length); + } + +#else if(0 == s_wechat_msg_init_flag) { uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); @@ -49,6 +60,7 @@ void mmi_wechat_msg_info_init(void) s_wechat_msg_init_flag = 1; } +#endif } uint8_t wechat_msg_info_count_get(void) diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c index 955319a3..db6ae231 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c @@ -6,8 +6,9 @@ static lv_signal_cb_t ancient_scrl_signal; -static uint8_t s_wechat_msg_init_flag = 0; -static nv_watch_wechat_msg_info_t * s_wechat_msg_info = NULL; +//static uint8_t s_wechat_msg_init_flag = 0; +static nv_watch_wechat_msg_info_t s_wechat_msg_info_t = {0}; +static nv_watch_wechat_msg_info_t * s_wechat_msg_info = &s_wechat_msg_info_t; static nv_watch_wechat_msg_item_info_t s_wechat_msg_item_info = {0}; static uint8_t s_wechat_play_anim_count = 0; static char s_wechat_selected_item_index = -1; @@ -28,6 +29,16 @@ void wechat_msg_info_nv_write(void) void mmi_wechat_msg_info_init(void) { +#if 1 + uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); + + if(nv_data_length != UI_NV_Read_Req(NV_SECTION_UI_WEHAT_MSG, 0, nv_data_length, (uint8_t *)s_wechat_msg_info)) + { + WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: NV_SECTION_UI_WEHAT_MSG read fail\n", __FUNCTION__, __LINE__); + _lv_memset_00(s_wechat_msg_info, nv_data_length); + } + +#else if(0 == s_wechat_msg_init_flag) { uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); @@ -49,6 +60,7 @@ void mmi_wechat_msg_info_init(void) s_wechat_msg_init_flag = 1; } +#endif } uint8_t wechat_msg_info_count_get(void) @@ -553,17 +565,25 @@ void wechat_chat_list_msg_item_delete_create(void) // current lv_obj_t * btn_delete_current = lv_cont_create(ext->delete_bg, NULL); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_set_size(btn_delete_current, 320, 70); + #else lv_obj_set_size(btn_delete_current, LV_HOR_RES - 40, 56); + #endif lv_obj_set_style_local_bg_color(btn_delete_current, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xB9, 0x86, 0xFF)); lv_obj_set_style_local_radius(btn_delete_current, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, 10); lv_obj_set_click(btn_delete_current, true); lv_obj_set_event_cb(btn_delete_current, wechat_msg_item_delete_select_btn_event_cb); - lv_obj_align(btn_delete_current, NULL, LV_ALIGN_IN_TOP_MID, 0, 40); + lv_obj_align(btn_delete_current, NULL, LV_ALIGN_IN_TOP_MID, 0, LV_VER_RES/6); // 40); lv_watch_set_free_num(btn_delete_current, 0); ext->delete_current = btn_delete_current; lv_obj_t * label_delete_current = lv_label_create(btn_delete_current, NULL); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_add_style(label_delete_current, LV_LABEL_PART_MAIN, &lv_watch_font40); + #else lv_obj_add_style(label_delete_current, LV_LABEL_PART_MAIN, &lv_watch_font26); + #endif lv_label_set_text_id(label_delete_current, WATCH_TEXT_ID_DELETE_CURRENT_ITEM); lv_label_set_align(label_delete_current, LV_LABEL_ALIGN_CENTER); lv_obj_align(label_delete_current, btn_delete_current, LV_ALIGN_CENTER, 0, 0); @@ -571,12 +591,20 @@ void wechat_chat_list_msg_item_delete_create(void) // all lv_obj_t * btn_delete_all = lv_cont_create(ext->delete_bg, btn_delete_current); lv_obj_set_style_local_bg_color(btn_delete_all, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xFF, 0x6F, 0x91)); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_align(btn_delete_all, btn_delete_current, LV_ALIGN_OUT_BOTTOM_MID, 0, 40); + #else lv_obj_align(btn_delete_all, btn_delete_current, LV_ALIGN_OUT_BOTTOM_MID, 0, 20); + #endif lv_watch_set_free_num(btn_delete_all, 1); ext->delete_all = btn_delete_all; lv_obj_t * label_delete_all = lv_label_create(btn_delete_all, NULL); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_add_style(label_delete_all, LV_LABEL_PART_MAIN, &lv_watch_font40); + #else lv_obj_add_style(label_delete_all, LV_LABEL_PART_MAIN, &lv_watch_font26); + #endif lv_label_set_text_id(label_delete_all, WATCH_TEXT_ID_DELETE_ALL_ITEM); lv_label_set_align(label_delete_all, LV_LABEL_ALIGN_CENTER); lv_obj_align(label_delete_all, btn_delete_all, LV_ALIGN_CENTER, 0, 0); @@ -585,40 +613,68 @@ void wechat_chat_list_msg_item_delete_create(void) lv_obj_t * btn_delete_back = lv_cont_create(ext->delete_bg, btn_delete_current); lv_obj_set_style_local_bg_color(btn_delete_back, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x47, 0xA6, 0xFF)); lv_obj_set_event_cb(btn_delete_back, wechat_msg_item_delete_cancel_btn_event_cb); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_align(btn_delete_back, btn_delete_all, LV_ALIGN_OUT_BOTTOM_MID, 0, 40); + #else lv_obj_align(btn_delete_back, btn_delete_all, LV_ALIGN_OUT_BOTTOM_MID, 0, 20); + #endif ext->delete_back = btn_delete_back; lv_obj_t * label_delete_back = lv_label_create(btn_delete_back, NULL); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_add_style(label_delete_back, LV_LABEL_PART_MAIN, &lv_watch_font40); + #else lv_obj_add_style(label_delete_back, LV_LABEL_PART_MAIN, &lv_watch_font26); + #endif lv_label_set_text_id(label_delete_back, WATCH_TEXT_ID_CANCEL); lv_label_set_align(label_delete_back, LV_LABEL_ALIGN_CENTER); lv_obj_align(label_delete_back, btn_delete_back, LV_ALIGN_CENTER, 0, 0); lv_obj_t * label_prompt = lv_label_create(ext->delete_bg, NULL); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_add_style(label_prompt, LV_LABEL_PART_MAIN, &lv_watch_font40_black); + #else lv_obj_add_style(label_prompt, LV_LABEL_PART_MAIN, &lv_watch_font26_black); + #endif lv_label_set_text_id(label_prompt, WATCH_TEXT_ID_DEL_Q); lv_obj_align(label_prompt, ext->delete_bg, LV_ALIGN_CENTER, 0, -30); ext->delete_label_prompt = label_prompt; lv_obj_t * btn_cancel = lv_btn_create(ext->delete_bg, NULL); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_set_size(btn_cancel, 140, 70); + #else lv_obj_set_size(btn_cancel, 100, 56); + #endif lv_obj_set_style_local_bg_color(btn_cancel, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_make(0x47, 0xA6, 0xFF)); lv_obj_set_style_local_radius(btn_cancel, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 30); lv_obj_set_style_local_bg_color(btn_cancel, LV_BTN_PART_MAIN, LV_STATE_PRESSED, lv_color_make(0x47, 0xA6, 0xFF)); lv_obj_set_style_local_radius(btn_cancel, LV_BTN_PART_MAIN, LV_STATE_PRESSED, 30); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_align(btn_cancel, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 60, -50); + #else lv_obj_align(btn_cancel, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 10, -20); + #endif lv_obj_set_event_cb(btn_cancel, wechat_msg_item_delete_cancel_btn_event_cb); ext->delete_btn_cancel = btn_cancel; lv_obj_t * label_cancel = lv_label_create(btn_cancel, NULL); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_add_style(label_cancel, LV_LABEL_PART_MAIN, &lv_watch_font40); + #else lv_obj_add_style(label_cancel, LV_LABEL_PART_MAIN, &lv_watch_font26); + #endif lv_label_set_text_id(label_cancel, WATCH_TEXT_ID_CANCEL); lv_obj_t * btn_ok = lv_btn_create(ext->delete_bg, btn_cancel); lv_obj_set_style_local_bg_color(btn_ok, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_make(0xFF, 0x6F, 0x91)); lv_obj_set_style_local_bg_color(btn_ok, LV_BTN_PART_MAIN, LV_STATE_PRESSED, lv_color_make(0xFF, 0x6F, 0x91)); + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_align(btn_ok, NULL, LV_ALIGN_IN_BOTTOM_RIGHT, -60, -50); + #else lv_obj_align(btn_ok, NULL, LV_ALIGN_IN_BOTTOM_RIGHT, -10, -20); + #endif lv_obj_set_event_cb(btn_ok, wechat_msg_item_delete_ok_btn_event_cb); ext->delete_btn_ok = btn_ok; @@ -700,6 +756,15 @@ void wechat_msg_sending_screen_timeout(void *para) sending_ext->sending_anim.var = NULL; } */ +#ifdef USE_LV_WATCH_UI_466_466 + if(NULL != sending_ext->sending_img && NULL != sending_ext->sending_label) + { + bool result = sending_ext->send_result; + + lv_label_set_text_id(sending_ext->sending_label, ((true == result) ? WATCH_TEXT_ID_COMMON_SEND_SUCCESS : WATCH_TEXT_ID_COMMON_SEND_FAILED)); + lv_obj_align(sending_ext->sending_label, NULL, LV_ALIGN_CENTER, 0, -10); + } +#else if(NULL != sending_ext->sending_img && NULL != sending_ext->sending_label) { bool result = sending_ext->send_result; @@ -710,6 +775,7 @@ void wechat_msg_sending_screen_timeout(void *para) lv_label_set_text_id(sending_ext->sending_label, ((true == result) ? WATCH_TEXT_ID_COMMON_SEND_SUCCESS : WATCH_TEXT_ID_COMMON_SEND_FAILED)); lv_obj_align(sending_ext->sending_label, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, -25); } +#endif sending_ext->result_timer_id = Hal_Timer_Start(1500, wechat_msg_sending_result_screen_timeout, sending_ext, FALSE); } @@ -765,6 +831,20 @@ lv_obj_t * wechat_msg_sending_screen_create(lv_obj_t * activity_obj) sending_ext->sending_timer_id = Hal_Timer_Start(1000 * 3, wechat_msg_sending_screen_timeout, sending_ext, FALSE); sending_ext->result_timer_id = NULL; +#ifdef USE_LV_WATCH_UI_466_466 + lv_obj_t * cont = lv_cont_create(obj, NULL); + lv_obj_set_size(cont, LV_HOR_RES, LV_VER_RES); + lv_obj_set_style_local_bg_color(cont, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, lv_color_make(194, 252, 252)); + lv_obj_align(cont, NULL, LV_ALIGN_CENTER, 0, 0); + sending_ext->sending_img = cont; + + lv_obj_t * label = lv_label_create(cont, NULL); + lv_obj_add_style(label, LV_LABEL_PART_MAIN, &lv_watch_font40_black); + lv_label_set_text_id(label, WATCH_TEXT_ID_COMMON_SENDING); + lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); + lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, -10); + sending_ext->sending_label = label; +#else lv_obj_t * img_bkg = lv_img_create(obj, NULL); lv_img_set_src(img_bkg, ICON_WECHAT_SENDING_BG); lv_obj_align(img_bkg, obj, LV_ALIGN_CENTER, 0, 0); @@ -778,6 +858,7 @@ lv_obj_t * wechat_msg_sending_screen_create(lv_obj_t * activity_obj) lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, -25); sending_ext->sending_label = label; +#endif /* lv_obj_t * img_sending = lv_img_create(img_bkg, NULL); @@ -998,22 +1079,30 @@ lv_obj_t * wechat_msg_recording_screen_create(lv_obj_t * activity_obj) lv_obj_t * label_warning = lv_label_create(cont, NULL); //lv_obj_set_style_local_text_font(label_warning, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_THEME_WATCH_NIGHT_FONT_SMALL); //lv_obj_set_style_local_text_color(label_warning, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_RED); +#ifdef USE_LV_WATCH_UI_466_466 + lv_obj_add_style(label_warning, LV_LABEL_PART_MAIN, &lv_watch_font40_black); +#else lv_obj_add_style(label_warning, LV_LABEL_PART_MAIN, &lv_watch_font26_black); +#endif //lv_label_set_long_mode(label_warning, LV_LABEL_LONG_BREAK); //lv_obj_set_width(label_warning, lv_obj_get_width(obj) * 2 / 3); lv_label_set_text_id(label_warning, WATCH_TEXT_ID_SLIDE_UP_WARNING); lv_label_set_align(label_warning, LV_LABEL_ALIGN_CENTER); - lv_obj_align(label_warning, cont, LV_ALIGN_IN_TOP_MID, 0, 30); + lv_obj_align(label_warning, cont, LV_ALIGN_IN_TOP_MID, 0, LV_HOR_RES/8); // 30); lv_obj_t * label_time = lv_label_create(cont, NULL); +#ifdef USE_LV_WATCH_UI_466_466 + lv_obj_add_style(label_time, LV_LABEL_PART_MAIN, &lv_watch_font40_black); +#else lv_obj_add_style(label_time, LV_LABEL_PART_MAIN, &lv_watch_font26_black); +#endif const char * rel_snd = lv_lang_get_text(WATCH_TEXT_ID_RELEASE_SENDING); uint8_t len = strlen(rel_snd) + 4; char * text = (char *)lv_mem_alloc(len); snprintf(text, len, "%s %d", rel_snd, WECHAT_MSG_DATA_RECORD_DURATION_MAX); lv_label_set_text(label_time, text); lv_mem_free(text); - lv_obj_align(label_time, label_warning, LV_ALIGN_OUT_BOTTOM_MID, 0, 30); + lv_obj_align(label_time, label_warning, LV_ALIGN_OUT_BOTTOM_MID, 0, LV_HOR_RES/8); // 30); recording_ext->label = label_time; lv_obj_t * img_release_snd = lv_img_create(cont, NULL); @@ -1618,7 +1707,11 @@ lv_obj_t * wechat_chat_list_msg_item_add(lv_obj_t * list_page, nv_watch_wechat_m list_item_ext = lv_obj_allocate_ext_attr(obj, sizeof(lv_wechat_msg_list_item_ext_t)); list_item_ext->item_index = i; list_item_ext->unread_img = NULL; + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_set_size(obj, LV_HOR_RES * 2 / 3, 50 + 50); + #else lv_obj_set_size(obj, LV_HOR_RES * 2 / 3, 50); + #endif lv_cont_set_fit4(obj, LV_FIT_NONE, LV_FIT_NONE, LV_FIT_NONE, LV_FIT_TIGHT); lv_obj_t * play_img = lv_img_create(obj, NULL); @@ -1651,6 +1744,45 @@ lv_obj_t * wechat_chat_list_msg_item_add(lv_obj_t * list_page, nv_watch_wechat_m lv_label_set_text(len_label, len_str); } + #ifdef USE_LV_WATCH_UI_466_466 + if(0 == msg_item->msg_from) // msg from slef + { + lv_obj_add_style(len_label, LV_LABEL_PART_MAIN, &list_page_ext->style_label_len_self); + //lv_img_set_src(obj, ICON_WECHAT_MY_VOICE_ITEM_BG); + lv_obj_add_style(obj, LV_CONT_PART_MAIN, &(list_page_ext->style_cont_self)); + lv_obj_align(obj, scrl, LV_ALIGN_IN_TOP_RIGHT, -10-10, obj_y); + if(0 < duration) + { + lv_img_set_src(play_img, ICON_WECHAT_MY_VOICE_ITEM_PLAYING3); + } + lv_obj_align(play_img, obj, LV_ALIGN_IN_LEFT_MID, 15+15, 0); + lv_obj_align(len_label, play_img, LV_ALIGN_OUT_RIGHT_MID, 10, 0); + lv_obj_del(unread_img); + } + else // msg from other + { + lv_obj_add_style(len_label, LV_LABEL_PART_MAIN, &list_page_ext->style_label_len_other); + //lv_img_set_src(obj, ICON_WECHAT_OTHER_VOICE_ITEM_BG); + lv_obj_add_style(obj, LV_CONT_PART_MAIN, &(list_page_ext->style_cont_other)); + lv_obj_align(obj, scrl, LV_ALIGN_IN_TOP_LEFT, 10+10, obj_y); + if(0 < duration) + { + lv_img_set_src(play_img, ICON_WECHAT_OTHER_VOICE_ITEM_PLAYING3); + } + lv_obj_align(play_img, obj, LV_ALIGN_IN_RIGHT_MID, -15-15, 0); + lv_obj_align(len_label, play_img, LV_ALIGN_OUT_LEFT_MID, -10, 0); + if(1 == msg_item->unread_flag) + { + lv_img_set_src(unread_img, ICON_WECHAT_UNREAD_FLAG); + lv_obj_align(unread_img, obj, LV_ALIGN_OUT_RIGHT_MID, 5, 0); + list_item_ext->unread_img = unread_img; + } + else + { + lv_obj_del(unread_img); + } + } + #else if(0 == msg_item->msg_from) // msg from slef { lv_obj_add_style(len_label, LV_LABEL_PART_MAIN, &list_page_ext->style_label_len_self); @@ -1688,6 +1820,7 @@ lv_obj_t * wechat_chat_list_msg_item_add(lv_obj_t * list_page, nv_watch_wechat_m lv_obj_del(unread_img); } } + #endif lv_obj_set_click(obj, true); lv_obj_set_event_cb(obj, wechat_chat_list_voice_item_event_cb); @@ -1702,7 +1835,11 @@ lv_obj_t * wechat_chat_list_msg_item_add(lv_obj_t * list_page, nv_watch_wechat_m list_item_ext = lv_obj_allocate_ext_attr(obj, sizeof(lv_wechat_msg_list_item_ext_t)); list_item_ext->item_index = i; list_item_ext->unread_img = NULL; + #ifdef USE_LV_WATCH_UI_466_466 + lv_obj_set_size(obj, LV_HOR_RES * 2 / 3, 50 + 50); + #else lv_obj_set_size(obj, LV_HOR_RES * 2 / 3, 50); //lv_obj_set_size(obj, 153, 53); // same with voice item + #endif lv_cont_set_fit4(obj, LV_FIT_NONE, LV_FIT_NONE, LV_FIT_NONE, LV_FIT_TIGHT); //lv_cont_set_layout(obj, LV_LAYOUT_COLUMN_LEFT); lv_obj_add_style(obj, LV_CONT_PART_MAIN, &(list_page_ext->style_cont_other)); @@ -1827,6 +1964,37 @@ void wechat_chat_list_create(lv_obj_t * obj, lv_wechat_ext_t * ext) lv_watch_obj_add_element(list_page); lv_watch_obj_add_element(scrl); +#ifdef USE_LV_WATCH_UI_466_466 + lv_style_init(&(list_page_ext->style_label_time)); + lv_style_copy(&(list_page_ext->style_label_time), &lv_watch_font30); + lv_style_set_text_color(&(list_page_ext->style_label_time), LV_STATE_DEFAULT, lv_color_make(20, 187, 242)); + + lv_style_init(&(list_page_ext->style_label_len_other)); + lv_style_copy(&(list_page_ext->style_label_len_other), &lv_watch_font40); + lv_style_set_text_color(&(list_page_ext->style_label_len_other), LV_STATE_DEFAULT, lv_color_make(202, 134, 255)); + + lv_style_init(&(list_page_ext->style_label_len_self)); + lv_style_copy(&(list_page_ext->style_label_len_self), &lv_watch_font40); + lv_style_set_text_color(&(list_page_ext->style_label_len_self), LV_STATE_DEFAULT, lv_color_make(108, 189, 5)); + + lv_style_init(&(list_page_ext->style_cont_self)); + lv_style_set_bg_color(&(list_page_ext->style_cont_self), LV_STATE_DEFAULT, LV_COLOR_MAKE(175, 242, 89)); + lv_style_set_radius(&(list_page_ext->style_cont_self), LV_STATE_DEFAULT, 15); // 30 + lv_style_set_pad_top(&(list_page_ext->style_cont_self), LV_STATE_DEFAULT, 10); // 8 + lv_style_set_pad_bottom(&(list_page_ext->style_cont_self), LV_STATE_DEFAULT, 10); // 8 + lv_style_set_pad_left(&(list_page_ext->style_cont_self), LV_STATE_DEFAULT, 5); // 8 + lv_style_set_pad_right(&(list_page_ext->style_cont_self), LV_STATE_DEFAULT, 5); // 8 + + lv_style_init(&(list_page_ext->style_cont_other)); + lv_style_set_bg_color(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, LV_COLOR_MAKE(0xE2, 0xBD, 0xFF)); + lv_style_set_radius(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, 15); + lv_style_set_pad_top(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, 10); + lv_style_set_pad_bottom(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, 10); + lv_style_set_pad_left(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, 5); + lv_style_set_pad_right(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, 5); + +#else + lv_style_init(&(list_page_ext->style_label_time)); lv_style_copy(&(list_page_ext->style_label_time), &lv_watch_font20); lv_style_set_text_color(&(list_page_ext->style_label_time), LV_STATE_DEFAULT, lv_color_make(20, 187, 242)); @@ -1854,6 +2022,7 @@ void wechat_chat_list_create(lv_obj_t * obj, lv_wechat_ext_t * ext) lv_style_set_pad_bottom(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, 10); lv_style_set_pad_left(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, 5); lv_style_set_pad_right(&(list_page_ext->style_cont_other), LV_STATE_DEFAULT, 5); +#endif _lv_memset_00(&(list_page_ext->voice_playing_anim), sizeof(lv_anim_t)); list_page_ext->voice_playing_msg_from = 0; diff --git a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c index 104376e9..b4924bbf 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c @@ -405,7 +405,11 @@ lv_obj_t * mmi_watch_server_search_screen_create(lv_obj_t * activity_obj) //lv_obj_add_protect(cont, LV_PROTECT_PRESS_LOST); lv_obj_t * label = lv_label_create(cont, NULL); +#ifdef USE_LV_WATCH_UI_466_466 + lv_obj_add_style(label, LV_LABEL_PART_MAIN, &lv_watch_font40); +#else lv_obj_add_style(label, LV_LABEL_PART_MAIN, &lv_watch_font20); +#endif lv_label_set_text_id(label, WATCH_TEXT_ID_SERVER_SEARCH_PROMPT); //lv_lang_get_text(WATCH_TEXT_ID_SERVER_SEARCH_PROMPT) lv_obj_align(label, cont, LV_ALIGN_CENTER, 0, 0);