setup_scr_SettingPage.c 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. /*
  2. * Copyright 2025 NXP
  3. * NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
  4. * accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
  5. * activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
  6. * comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
  7. * terms, then you may not retain, install, activate or otherwise use the software.
  8. */
  9. #include "lvgl.h"
  10. #include <stdio.h>
  11. #include "gui_guider.h"
  12. #include "events_init.h"
  13. #include "widgets_init.h"
  14. #include "custom.h"
  15. void setup_scr_SettingPage(lv_ui *ui)
  16. {
  17. //Write codes SettingPage
  18. ui->SettingPage = lv_obj_create(NULL);
  19. lv_obj_set_size(ui->SettingPage, 480, 480);
  20. lv_obj_set_scrollbar_mode(ui->SettingPage, LV_SCROLLBAR_MODE_OFF);
  21. //Write style for SettingPage, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  22. lv_obj_set_style_bg_opa(ui->SettingPage, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  23. //Write codes SettingPage_tabview_1
  24. ui->SettingPage_tabview_1 = lv_tabview_create(ui->SettingPage);
  25. lv_obj_set_pos(ui->SettingPage_tabview_1, 0, 0);
  26. lv_obj_set_size(ui->SettingPage_tabview_1, 480, 480);
  27. lv_obj_set_scrollbar_mode(ui->SettingPage_tabview_1, LV_SCROLLBAR_MODE_OFF);
  28. lv_tabview_set_tab_bar_position(ui->SettingPage_tabview_1, LV_DIR_TOP);
  29. lv_tabview_set_tab_bar_size(ui->SettingPage_tabview_1, 60);
  30. //Write style for SettingPage_tabview_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  31. lv_obj_set_style_bg_opa(ui->SettingPage_tabview_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  32. lv_obj_set_style_bg_color(ui->SettingPage_tabview_1, lv_color_hex(0x1f1e23), LV_PART_MAIN|LV_STATE_DEFAULT);
  33. lv_obj_set_style_bg_grad_dir(ui->SettingPage_tabview_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
  34. lv_obj_set_style_text_color(ui->SettingPage_tabview_1, lv_color_hex(0x4d4d4d), LV_PART_MAIN|LV_STATE_DEFAULT);
  35. lv_obj_set_style_text_font(ui->SettingPage_tabview_1, &lv_font_Alibaba_PuHuiTi_Medium_15, LV_PART_MAIN|LV_STATE_DEFAULT);
  36. lv_obj_set_style_text_opa(ui->SettingPage_tabview_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  37. lv_obj_set_style_text_letter_space(ui->SettingPage_tabview_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
  38. lv_obj_set_style_text_line_space(ui->SettingPage_tabview_1, 16, LV_PART_MAIN|LV_STATE_DEFAULT);
  39. lv_obj_set_style_border_width(ui->SettingPage_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  40. lv_obj_set_style_radius(ui->SettingPage_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  41. lv_obj_set_style_shadow_width(ui->SettingPage_tabview_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  42. //Write style state: LV_STATE_DEFAULT for &style_SettingPage_tabview_1_extra_btnm_main_default
  43. static lv_style_t style_SettingPage_tabview_1_extra_btnm_main_default;
  44. ui_init_style(&style_SettingPage_tabview_1_extra_btnm_main_default);
  45. lv_style_set_bg_opa(&style_SettingPage_tabview_1_extra_btnm_main_default, 255);
  46. lv_style_set_bg_color(&style_SettingPage_tabview_1_extra_btnm_main_default, lv_color_hex(0x000000));
  47. lv_style_set_bg_grad_dir(&style_SettingPage_tabview_1_extra_btnm_main_default, LV_GRAD_DIR_NONE);
  48. lv_style_set_border_width(&style_SettingPage_tabview_1_extra_btnm_main_default, 0);
  49. lv_style_set_radius(&style_SettingPage_tabview_1_extra_btnm_main_default, 0);
  50. lv_obj_add_style(lv_tabview_get_tab_bar(ui->SettingPage_tabview_1), &style_SettingPage_tabview_1_extra_btnm_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
  51. //Write style state: LV_STATE_DEFAULT for &style_SettingPage_tabview_1_extra_btnm_items_default
  52. static lv_style_t style_SettingPage_tabview_1_extra_btnm_items_default;
  53. ui_init_style(&style_SettingPage_tabview_1_extra_btnm_items_default);
  54. lv_style_set_text_color(&style_SettingPage_tabview_1_extra_btnm_items_default, lv_color_hex(0xffffff));
  55. lv_style_set_text_font(&style_SettingPage_tabview_1_extra_btnm_items_default, &lv_font_Alibaba_PuHuiTi_Medium_20);
  56. lv_style_set_text_opa(&style_SettingPage_tabview_1_extra_btnm_items_default, 255);
  57. lv_obj_add_style(lv_tabview_get_tab_bar(ui->SettingPage_tabview_1), &style_SettingPage_tabview_1_extra_btnm_items_default, LV_PART_ITEMS|LV_STATE_DEFAULT);
  58. //Write style state: LV_STATE_CHECKED for &style_SettingPage_tabview_1_extra_btnm_items_checked
  59. static lv_style_t style_SettingPage_tabview_1_extra_btnm_items_checked;
  60. ui_init_style(&style_SettingPage_tabview_1_extra_btnm_items_checked);
  61. lv_style_set_text_color(&style_SettingPage_tabview_1_extra_btnm_items_checked, lv_color_hex(0x9fff00));
  62. lv_style_set_text_font(&style_SettingPage_tabview_1_extra_btnm_items_checked, &lv_font_Alatsi_Regular_18);
  63. lv_style_set_text_opa(&style_SettingPage_tabview_1_extra_btnm_items_checked, 255);
  64. lv_style_set_border_width(&style_SettingPage_tabview_1_extra_btnm_items_checked, 3);
  65. lv_style_set_border_opa(&style_SettingPage_tabview_1_extra_btnm_items_checked, 255);
  66. lv_style_set_border_color(&style_SettingPage_tabview_1_extra_btnm_items_checked, lv_color_hex(0x9fff00));
  67. lv_style_set_border_side(&style_SettingPage_tabview_1_extra_btnm_items_checked, LV_BORDER_SIDE_BOTTOM);
  68. lv_style_set_radius(&style_SettingPage_tabview_1_extra_btnm_items_checked, 0);
  69. lv_style_set_bg_opa(&style_SettingPage_tabview_1_extra_btnm_items_checked, 0);
  70. lv_obj_add_style(lv_tabview_get_tab_bar(ui->SettingPage_tabview_1), &style_SettingPage_tabview_1_extra_btnm_items_checked, LV_PART_ITEMS|LV_STATE_CHECKED);
  71. //Write codes 网络
  72. ui->SettingPage_tabview_1_tab_1 = lv_tabview_add_tab(ui->SettingPage_tabview_1,"网络");
  73. lv_obj_t * SettingPage_tabview_1_tab_1_label = lv_label_create(ui->SettingPage_tabview_1_tab_1);
  74. lv_label_set_text(SettingPage_tabview_1_tab_1_label, "\n");
  75. //Write codes SettingPage_sp_wifi_scan
  76. ui->SettingPage_sp_wifi_scan = lv_spinner_create(ui->SettingPage_tabview_1_tab_1);
  77. lv_obj_set_pos(ui->SettingPage_sp_wifi_scan, 198, 3);
  78. lv_obj_set_size(ui->SettingPage_sp_wifi_scan, 44, 47);
  79. lv_obj_add_flag(ui->SettingPage_sp_wifi_scan, LV_OBJ_FLAG_HIDDEN);
  80. lv_spinner_set_anim_params(ui->SettingPage_sp_wifi_scan, 2000, 200);
  81. //Write style for SettingPage_sp_wifi_scan, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  82. lv_obj_set_style_pad_top(ui->SettingPage_sp_wifi_scan, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
  83. lv_obj_set_style_pad_bottom(ui->SettingPage_sp_wifi_scan, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
  84. lv_obj_set_style_pad_left(ui->SettingPage_sp_wifi_scan, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
  85. lv_obj_set_style_pad_right(ui->SettingPage_sp_wifi_scan, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
  86. lv_obj_set_style_bg_opa(ui->SettingPage_sp_wifi_scan, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  87. lv_obj_set_style_arc_width(ui->SettingPage_sp_wifi_scan, 7, LV_PART_MAIN|LV_STATE_DEFAULT);
  88. lv_obj_set_style_arc_opa(ui->SettingPage_sp_wifi_scan, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  89. lv_obj_set_style_arc_color(ui->SettingPage_sp_wifi_scan, lv_color_hex(0xd5d6de), LV_PART_MAIN|LV_STATE_DEFAULT);
  90. lv_obj_set_style_arc_rounded(ui->SettingPage_sp_wifi_scan, false, LV_PART_MAIN|LV_STATE_DEFAULT);
  91. lv_obj_set_style_shadow_width(ui->SettingPage_sp_wifi_scan, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  92. //Write style for SettingPage_sp_wifi_scan, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
  93. lv_obj_set_style_arc_width(ui->SettingPage_sp_wifi_scan, 7, LV_PART_INDICATOR|LV_STATE_DEFAULT);
  94. lv_obj_set_style_arc_opa(ui->SettingPage_sp_wifi_scan, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
  95. lv_obj_set_style_arc_color(ui->SettingPage_sp_wifi_scan, lv_color_hex(0x0071ff), LV_PART_INDICATOR|LV_STATE_DEFAULT);
  96. lv_obj_set_style_arc_rounded(ui->SettingPage_sp_wifi_scan, false, LV_PART_INDICATOR|LV_STATE_DEFAULT);
  97. //Write codes SettingPage_lab_wifi_status
  98. ui->SettingPage_lab_wifi_status = lv_label_create(ui->SettingPage_tabview_1_tab_1);
  99. lv_obj_set_pos(ui->SettingPage_lab_wifi_status, 68, 0);
  100. lv_obj_set_size(ui->SettingPage_lab_wifi_status, 100, 32);
  101. lv_label_set_text(ui->SettingPage_lab_wifi_status, "未连接已成功");
  102. lv_label_set_long_mode(ui->SettingPage_lab_wifi_status, LV_LABEL_LONG_WRAP);
  103. //Write style for SettingPage_lab_wifi_status, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  104. lv_obj_set_style_border_width(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  105. lv_obj_set_style_radius(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  106. lv_obj_set_style_text_color(ui->SettingPage_lab_wifi_status, lv_color_hex(0xffd816), LV_PART_MAIN|LV_STATE_DEFAULT);
  107. lv_obj_set_style_text_font(ui->SettingPage_lab_wifi_status, &lv_font_Alibaba_PuHuiTi_Medium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  108. lv_obj_set_style_text_opa(ui->SettingPage_lab_wifi_status, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  109. lv_obj_set_style_text_letter_space(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  110. lv_obj_set_style_text_line_space(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  111. lv_obj_set_style_text_align(ui->SettingPage_lab_wifi_status, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  112. lv_obj_set_style_bg_opa(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  113. lv_obj_set_style_pad_top(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  114. lv_obj_set_style_pad_right(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  115. lv_obj_set_style_pad_bottom(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  116. lv_obj_set_style_pad_left(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  117. lv_obj_set_style_shadow_width(ui->SettingPage_lab_wifi_status, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  118. //Write codes SettingPage_label_1
  119. ui->SettingPage_label_1 = lv_label_create(ui->SettingPage_tabview_1_tab_1);
  120. lv_obj_set_pos(ui->SettingPage_label_1, -16, 0);
  121. lv_obj_set_size(ui->SettingPage_label_1, 100, 32);
  122. lv_label_set_text(ui->SettingPage_label_1, "网络状态:");
  123. lv_label_set_long_mode(ui->SettingPage_label_1, LV_LABEL_LONG_WRAP);
  124. //Write style for SettingPage_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  125. lv_obj_set_style_border_width(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  126. lv_obj_set_style_radius(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  127. lv_obj_set_style_text_color(ui->SettingPage_label_1, lv_color_hex(0xffd816), LV_PART_MAIN|LV_STATE_DEFAULT);
  128. lv_obj_set_style_text_font(ui->SettingPage_label_1, &lv_font_Alibaba_PuHuiTi_Medium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  129. lv_obj_set_style_text_opa(ui->SettingPage_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  130. lv_obj_set_style_text_letter_space(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  131. lv_obj_set_style_text_line_space(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  132. lv_obj_set_style_text_align(ui->SettingPage_label_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  133. lv_obj_set_style_bg_opa(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  134. lv_obj_set_style_pad_top(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  135. lv_obj_set_style_pad_right(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  136. lv_obj_set_style_pad_bottom(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  137. lv_obj_set_style_pad_left(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  138. lv_obj_set_style_shadow_width(ui->SettingPage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  139. //Write codes SettingPage_p_wifi_connect
  140. ui->SettingPage_p_wifi_connect = lv_obj_create(ui->SettingPage_tabview_1_tab_1);
  141. lv_obj_set_pos(ui->SettingPage_p_wifi_connect, 67, 69);
  142. lv_obj_set_size(ui->SettingPage_p_wifi_connect, 300, 200);
  143. lv_obj_set_scrollbar_mode(ui->SettingPage_p_wifi_connect, LV_SCROLLBAR_MODE_OFF);
  144. //Write style for SettingPage_p_wifi_connect, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  145. lv_obj_set_style_border_width(ui->SettingPage_p_wifi_connect, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
  146. lv_obj_set_style_border_opa(ui->SettingPage_p_wifi_connect, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  147. lv_obj_set_style_border_color(ui->SettingPage_p_wifi_connect, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
  148. lv_obj_set_style_border_side(ui->SettingPage_p_wifi_connect, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
  149. lv_obj_set_style_radius(ui->SettingPage_p_wifi_connect, 11, LV_PART_MAIN|LV_STATE_DEFAULT);
  150. lv_obj_set_style_bg_opa(ui->SettingPage_p_wifi_connect, 196, LV_PART_MAIN|LV_STATE_DEFAULT);
  151. lv_obj_set_style_bg_color(ui->SettingPage_p_wifi_connect, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
  152. lv_obj_set_style_bg_grad_dir(ui->SettingPage_p_wifi_connect, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
  153. lv_obj_set_style_pad_top(ui->SettingPage_p_wifi_connect, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  154. lv_obj_set_style_pad_bottom(ui->SettingPage_p_wifi_connect, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  155. lv_obj_set_style_pad_left(ui->SettingPage_p_wifi_connect, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  156. lv_obj_set_style_pad_right(ui->SettingPage_p_wifi_connect, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  157. lv_obj_set_style_shadow_width(ui->SettingPage_p_wifi_connect, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  158. //Write codes SettingPage_lab_wifi_ssid
  159. ui->SettingPage_lab_wifi_ssid = lv_label_create(ui->SettingPage_p_wifi_connect);
  160. lv_obj_set_pos(ui->SettingPage_lab_wifi_ssid, 101, 28);
  161. lv_obj_set_size(ui->SettingPage_lab_wifi_ssid, 100, 32);
  162. lv_label_set_text(ui->SettingPage_lab_wifi_ssid, "Label");
  163. lv_label_set_long_mode(ui->SettingPage_lab_wifi_ssid, LV_LABEL_LONG_WRAP);
  164. //Write style for SettingPage_lab_wifi_ssid, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  165. lv_obj_set_style_border_width(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  166. lv_obj_set_style_radius(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  167. lv_obj_set_style_text_color(ui->SettingPage_lab_wifi_ssid, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
  168. lv_obj_set_style_text_font(ui->SettingPage_lab_wifi_ssid, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  169. lv_obj_set_style_text_opa(ui->SettingPage_lab_wifi_ssid, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  170. lv_obj_set_style_text_letter_space(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  171. lv_obj_set_style_text_line_space(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  172. lv_obj_set_style_text_align(ui->SettingPage_lab_wifi_ssid, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  173. lv_obj_set_style_bg_opa(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  174. lv_obj_set_style_pad_top(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  175. lv_obj_set_style_pad_right(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  176. lv_obj_set_style_pad_bottom(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  177. lv_obj_set_style_pad_left(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  178. lv_obj_set_style_shadow_width(ui->SettingPage_lab_wifi_ssid, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  179. //Write codes SettingPage_label_3
  180. ui->SettingPage_label_3 = lv_label_create(ui->SettingPage_p_wifi_connect);
  181. lv_obj_set_pos(ui->SettingPage_label_3, -10, 84);
  182. lv_obj_set_size(ui->SettingPage_label_3, 100, 32);
  183. lv_label_set_text(ui->SettingPage_label_3, "密码:\n");
  184. lv_label_set_long_mode(ui->SettingPage_label_3, LV_LABEL_LONG_WRAP);
  185. //Write style for SettingPage_label_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  186. lv_obj_set_style_border_width(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  187. lv_obj_set_style_radius(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  188. lv_obj_set_style_text_color(ui->SettingPage_label_3, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
  189. lv_obj_set_style_text_font(ui->SettingPage_label_3, &lv_font_Alibaba_PuHuiTi_Medium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  190. lv_obj_set_style_text_opa(ui->SettingPage_label_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  191. lv_obj_set_style_text_letter_space(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  192. lv_obj_set_style_text_line_space(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  193. lv_obj_set_style_text_align(ui->SettingPage_label_3, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  194. lv_obj_set_style_bg_opa(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  195. lv_obj_set_style_pad_top(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  196. lv_obj_set_style_pad_right(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  197. lv_obj_set_style_pad_bottom(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  198. lv_obj_set_style_pad_left(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  199. lv_obj_set_style_shadow_width(ui->SettingPage_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  200. //Write codes SettingPage_btn_3
  201. ui->SettingPage_btn_3 = lv_button_create(ui->SettingPage_p_wifi_connect);
  202. lv_obj_set_pos(ui->SettingPage_btn_3, 169, 132);
  203. lv_obj_set_size(ui->SettingPage_btn_3, 100, 50);
  204. ui->SettingPage_btn_3_label = lv_label_create(ui->SettingPage_btn_3);
  205. lv_label_set_text(ui->SettingPage_btn_3_label, "Button");
  206. lv_label_set_long_mode(ui->SettingPage_btn_3_label, LV_LABEL_LONG_WRAP);
  207. lv_obj_align(ui->SettingPage_btn_3_label, LV_ALIGN_CENTER, 0, 0);
  208. lv_obj_set_style_pad_all(ui->SettingPage_btn_3, 0, LV_STATE_DEFAULT);
  209. lv_obj_set_width(ui->SettingPage_btn_3_label, LV_PCT(100));
  210. //Write style for SettingPage_btn_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  211. lv_obj_set_style_bg_opa(ui->SettingPage_btn_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  212. lv_obj_set_style_bg_color(ui->SettingPage_btn_3, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
  213. lv_obj_set_style_bg_grad_dir(ui->SettingPage_btn_3, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
  214. lv_obj_set_style_border_width(ui->SettingPage_btn_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  215. lv_obj_set_style_radius(ui->SettingPage_btn_3, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
  216. lv_obj_set_style_shadow_width(ui->SettingPage_btn_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  217. lv_obj_set_style_text_color(ui->SettingPage_btn_3, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
  218. lv_obj_set_style_text_font(ui->SettingPage_btn_3, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  219. lv_obj_set_style_text_opa(ui->SettingPage_btn_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  220. lv_obj_set_style_text_align(ui->SettingPage_btn_3, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  221. //Write codes SettingPage_btn_6
  222. ui->SettingPage_btn_6 = lv_button_create(ui->SettingPage_p_wifi_connect);
  223. lv_obj_set_pos(ui->SettingPage_btn_6, 28, 137);
  224. lv_obj_set_size(ui->SettingPage_btn_6, 100, 50);
  225. ui->SettingPage_btn_6_label = lv_label_create(ui->SettingPage_btn_6);
  226. lv_label_set_text(ui->SettingPage_btn_6_label, "Button");
  227. lv_label_set_long_mode(ui->SettingPage_btn_6_label, LV_LABEL_LONG_WRAP);
  228. lv_obj_align(ui->SettingPage_btn_6_label, LV_ALIGN_CENTER, 0, 0);
  229. lv_obj_set_style_pad_all(ui->SettingPage_btn_6, 0, LV_STATE_DEFAULT);
  230. lv_obj_set_width(ui->SettingPage_btn_6_label, LV_PCT(100));
  231. //Write style for SettingPage_btn_6, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  232. lv_obj_set_style_bg_opa(ui->SettingPage_btn_6, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  233. lv_obj_set_style_bg_color(ui->SettingPage_btn_6, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
  234. lv_obj_set_style_bg_grad_dir(ui->SettingPage_btn_6, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
  235. lv_obj_set_style_border_width(ui->SettingPage_btn_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  236. lv_obj_set_style_radius(ui->SettingPage_btn_6, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
  237. lv_obj_set_style_shadow_width(ui->SettingPage_btn_6, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  238. lv_obj_set_style_text_color(ui->SettingPage_btn_6, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
  239. lv_obj_set_style_text_font(ui->SettingPage_btn_6, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  240. lv_obj_set_style_text_opa(ui->SettingPage_btn_6, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  241. lv_obj_set_style_text_align(ui->SettingPage_btn_6, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  242. //Write codes SettingPage_label_2
  243. ui->SettingPage_label_2 = lv_label_create(ui->SettingPage_p_wifi_connect);
  244. lv_obj_set_pos(ui->SettingPage_label_2, 3, 28);
  245. lv_obj_set_size(ui->SettingPage_label_2, 100, 32);
  246. lv_label_set_text(ui->SettingPage_label_2, "SSID:");
  247. lv_label_set_long_mode(ui->SettingPage_label_2, LV_LABEL_LONG_WRAP);
  248. //Write style for SettingPage_label_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  249. lv_obj_set_style_border_width(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  250. lv_obj_set_style_radius(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  251. lv_obj_set_style_text_color(ui->SettingPage_label_2, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
  252. lv_obj_set_style_text_font(ui->SettingPage_label_2, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  253. lv_obj_set_style_text_opa(ui->SettingPage_label_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  254. lv_obj_set_style_text_letter_space(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  255. lv_obj_set_style_text_line_space(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  256. lv_obj_set_style_text_align(ui->SettingPage_label_2, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  257. lv_obj_set_style_bg_opa(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  258. lv_obj_set_style_pad_top(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  259. lv_obj_set_style_pad_right(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  260. lv_obj_set_style_pad_bottom(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  261. lv_obj_set_style_pad_left(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  262. lv_obj_set_style_shadow_width(ui->SettingPage_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  263. //Write codes SettingPage_txt_wifi_password
  264. ui->SettingPage_txt_wifi_password = lv_textarea_create(ui->SettingPage_p_wifi_connect);
  265. lv_obj_set_pos(ui->SettingPage_txt_wifi_password, 70, 74);
  266. lv_obj_set_size(ui->SettingPage_txt_wifi_password, 184, 38);
  267. lv_textarea_set_text(ui->SettingPage_txt_wifi_password, "");
  268. lv_textarea_set_placeholder_text(ui->SettingPage_txt_wifi_password, "");
  269. lv_textarea_set_password_bullet(ui->SettingPage_txt_wifi_password, "*");
  270. lv_textarea_set_password_mode(ui->SettingPage_txt_wifi_password, false);
  271. lv_textarea_set_one_line(ui->SettingPage_txt_wifi_password, true);
  272. lv_textarea_set_accepted_chars(ui->SettingPage_txt_wifi_password, "");
  273. lv_textarea_set_max_length(ui->SettingPage_txt_wifi_password, 32);
  274. #if LV_USE_KEYBOARD
  275. lv_obj_add_event_cb(ui->SettingPage_txt_wifi_password, ta_event_cb, LV_EVENT_ALL, ui->g_kb_top_layer);
  276. #endif
  277. //Write style for SettingPage_txt_wifi_password, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  278. lv_obj_set_style_text_color(ui->SettingPage_txt_wifi_password, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
  279. lv_obj_set_style_text_font(ui->SettingPage_txt_wifi_password, &lv_font_montserratMedium_12, LV_PART_MAIN|LV_STATE_DEFAULT);
  280. lv_obj_set_style_text_opa(ui->SettingPage_txt_wifi_password, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  281. lv_obj_set_style_text_letter_space(ui->SettingPage_txt_wifi_password, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
  282. lv_obj_set_style_text_align(ui->SettingPage_txt_wifi_password, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
  283. lv_obj_set_style_bg_opa(ui->SettingPage_txt_wifi_password, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  284. lv_obj_set_style_bg_color(ui->SettingPage_txt_wifi_password, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
  285. lv_obj_set_style_bg_grad_dir(ui->SettingPage_txt_wifi_password, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
  286. lv_obj_set_style_border_width(ui->SettingPage_txt_wifi_password, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
  287. lv_obj_set_style_border_opa(ui->SettingPage_txt_wifi_password, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  288. lv_obj_set_style_border_color(ui->SettingPage_txt_wifi_password, lv_color_hex(0xe6e6e6), LV_PART_MAIN|LV_STATE_DEFAULT);
  289. lv_obj_set_style_border_side(ui->SettingPage_txt_wifi_password, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
  290. lv_obj_set_style_shadow_width(ui->SettingPage_txt_wifi_password, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  291. lv_obj_set_style_pad_top(ui->SettingPage_txt_wifi_password, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
  292. lv_obj_set_style_pad_right(ui->SettingPage_txt_wifi_password, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
  293. lv_obj_set_style_pad_left(ui->SettingPage_txt_wifi_password, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
  294. lv_obj_set_style_radius(ui->SettingPage_txt_wifi_password, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
  295. //Write style for SettingPage_txt_wifi_password, Part: LV_PART_SCROLLBAR, State: LV_STATE_DEFAULT.
  296. lv_obj_set_style_bg_opa(ui->SettingPage_txt_wifi_password, 255, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
  297. lv_obj_set_style_bg_color(ui->SettingPage_txt_wifi_password, lv_color_hex(0x2195f6), LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
  298. lv_obj_set_style_bg_grad_dir(ui->SettingPage_txt_wifi_password, LV_GRAD_DIR_NONE, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
  299. lv_obj_set_style_radius(ui->SettingPage_txt_wifi_password, 0, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
  300. //Write codes SettingPage_btn_1
  301. ui->SettingPage_btn_1 = lv_button_create(ui->SettingPage_tabview_1_tab_1);
  302. lv_obj_set_pos(ui->SettingPage_btn_1, 42, 336);
  303. lv_obj_set_size(ui->SettingPage_btn_1, 135, 38);
  304. ui->SettingPage_btn_1_label = lv_label_create(ui->SettingPage_btn_1);
  305. lv_label_set_text(ui->SettingPage_btn_1_label, "查找网络");
  306. lv_label_set_long_mode(ui->SettingPage_btn_1_label, LV_LABEL_LONG_WRAP);
  307. lv_obj_align(ui->SettingPage_btn_1_label, LV_ALIGN_CENTER, 0, 0);
  308. lv_obj_set_style_pad_all(ui->SettingPage_btn_1, 0, LV_STATE_DEFAULT);
  309. lv_obj_set_width(ui->SettingPage_btn_1_label, LV_PCT(100));
  310. //Write style for SettingPage_btn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  311. lv_obj_set_style_bg_opa(ui->SettingPage_btn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  312. lv_obj_set_style_bg_color(ui->SettingPage_btn_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
  313. lv_obj_set_style_bg_grad_dir(ui->SettingPage_btn_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
  314. lv_obj_set_style_border_width(ui->SettingPage_btn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  315. lv_obj_set_style_radius(ui->SettingPage_btn_1, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
  316. lv_obj_set_style_shadow_width(ui->SettingPage_btn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  317. lv_obj_set_style_text_color(ui->SettingPage_btn_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
  318. lv_obj_set_style_text_font(ui->SettingPage_btn_1, &lv_font_Alibaba_PuHuiTi_Medium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  319. lv_obj_set_style_text_opa(ui->SettingPage_btn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  320. lv_obj_set_style_text_align(ui->SettingPage_btn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  321. //Write codes SettingPage_btn_5
  322. ui->SettingPage_btn_5 = lv_button_create(ui->SettingPage_tabview_1_tab_1);
  323. lv_obj_set_pos(ui->SettingPage_btn_5, 261, 336);
  324. lv_obj_set_size(ui->SettingPage_btn_5, 135, 38);
  325. ui->SettingPage_btn_5_label = lv_label_create(ui->SettingPage_btn_5);
  326. lv_label_set_text(ui->SettingPage_btn_5_label, "重置网络\n");
  327. lv_label_set_long_mode(ui->SettingPage_btn_5_label, LV_LABEL_LONG_WRAP);
  328. lv_obj_align(ui->SettingPage_btn_5_label, LV_ALIGN_CENTER, 0, 0);
  329. lv_obj_set_style_pad_all(ui->SettingPage_btn_5, 0, LV_STATE_DEFAULT);
  330. lv_obj_set_width(ui->SettingPage_btn_5_label, LV_PCT(100));
  331. //Write style for SettingPage_btn_5, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
  332. lv_obj_set_style_bg_opa(ui->SettingPage_btn_5, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  333. lv_obj_set_style_bg_color(ui->SettingPage_btn_5, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
  334. lv_obj_set_style_bg_grad_dir(ui->SettingPage_btn_5, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
  335. lv_obj_set_style_border_width(ui->SettingPage_btn_5, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  336. lv_obj_set_style_radius(ui->SettingPage_btn_5, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
  337. lv_obj_set_style_shadow_width(ui->SettingPage_btn_5, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
  338. lv_obj_set_style_text_color(ui->SettingPage_btn_5, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
  339. lv_obj_set_style_text_font(ui->SettingPage_btn_5, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_DEFAULT);
  340. lv_obj_set_style_text_opa(ui->SettingPage_btn_5, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
  341. lv_obj_set_style_text_align(ui->SettingPage_btn_5, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
  342. //Write codes 高级设置
  343. ui->SettingPage_tabview_1_tab_2 = lv_tabview_add_tab(ui->SettingPage_tabview_1,"高级设置");
  344. lv_obj_t * SettingPage_tabview_1_tab_2_label = lv_label_create(ui->SettingPage_tabview_1_tab_2);
  345. lv_label_set_text(SettingPage_tabview_1_tab_2_label, "高级设置");
  346. //Write codes 关于
  347. ui->SettingPage_tabview_1_tab_3 = lv_tabview_add_tab(ui->SettingPage_tabview_1,"关于");
  348. lv_obj_t * SettingPage_tabview_1_tab_3_label = lv_label_create(ui->SettingPage_tabview_1_tab_3);
  349. lv_label_set_text(SettingPage_tabview_1_tab_3_label, "con3");
  350. //The custom code of SettingPage.
  351. //Update current screen layout.
  352. lv_obj_update_layout(ui->SettingPage);
  353. //Init events for screen.
  354. events_init_SettingPage(ui);
  355. }