diff --git a/generated/ui_320x240/screens.c b/generated/ui_320x240/screens.c index 6446abc..c6ae425 100644 --- a/generated/ui_320x240/screens.c +++ b/generated/ui_320x240/screens.c @@ -196,6 +196,58 @@ void create_screen_boot_screen() { lv_obj_set_style_text_font(obj, &ui_font_montserrat_20, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_color(obj, lv_color_hex(0xff000000), LV_PART_MAIN | LV_STATE_DEFAULT); } + { + // SettingsRebootPanel + lv_obj_t *obj = lv_obj_create(parent_obj); + objects.settings_reboot_panel = obj; + lv_obj_set_pos(obj, LV_PCT(0), LV_PCT(12)); + lv_obj_set_size(obj, 240, 120); + lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN); + lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLLABLE); + add_style_settings_panel_style(obj); + lv_obj_set_style_border_width(obj, 2, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_radius(obj, 12, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_border_color(obj, lv_color_hex(0xff216ad8), LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_align(obj, LV_ALIGN_TOP_MID, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_border_opa(obj, 255, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_bg_opa(obj, 250, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_layout(obj, LV_LAYOUT_NONE, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_pad_top(obj, 6, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_pad_bottom(obj, 10, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_pad_left(obj, 5, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_pad_right(obj, 5, LV_PART_MAIN | LV_STATE_DEFAULT); + { + lv_obj_t *parent_obj = obj; + { + lv_obj_t *obj = lv_label_create(parent_obj); + objects.obj1 = obj; + lv_obj_set_pos(obj, 0, 20); + lv_obj_set_size(obj, 200, LV_SIZE_CONTENT); + lv_label_set_long_mode(obj, LV_LABEL_LONG_CLIP); + lv_label_set_text(obj, _("Reboot into former UI ?")); + lv_obj_set_style_align(obj, LV_ALIGN_TOP_MID, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_text_align(obj, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_text_opa(obj, 200, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5858), LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_text_font(obj, &ui_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_align(obj, LV_ALIGN_TOP_LEFT, LV_PART_MAIN | LV_STATE_DISABLED); + } + { + lv_obj_t *obj = lv_obj_create(parent_obj); + objects.obj2 = obj; + lv_obj_set_pos(obj, 4, 5); + lv_obj_set_size(obj, 160, 50); + lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_pad_top(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_pad_right(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); + lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); + create_user_widget_ok_cancel_widget(obj, 20); + lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); + } + } + } } } } @@ -204,6 +256,7 @@ void create_screen_boot_screen() { } void tick_screen_boot_screen() { + tick_user_widget_ok_cancel_widget(20); } void create_screen_main_screen() { @@ -3078,7 +3131,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj1 = obj; + objects.obj3 = obj; lv_obj_set_pos(obj, 4, 5); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3087,7 +3140,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 228); + create_user_widget_ok_cancel_widget(obj, 234); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3390,7 +3443,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj2 = obj; + objects.obj4 = obj; lv_obj_set_pos(obj, 4, 14); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3399,7 +3452,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 249); + create_user_widget_ok_cancel_widget(obj, 255); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3435,7 +3488,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj3 = obj; + objects.obj5 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3444,7 +3497,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 255); + create_user_widget_ok_cancel_widget(obj, 261); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3513,7 +3566,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj4 = obj; + objects.obj6 = obj; lv_obj_set_pos(obj, 0, 10); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3522,7 +3575,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 263); + create_user_widget_ok_cancel_widget(obj, 269); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3559,7 +3612,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj5 = obj; + objects.obj7 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3568,7 +3621,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 269); + create_user_widget_ok_cancel_widget(obj, 275); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3670,7 +3723,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj6 = obj; + objects.obj8 = obj; lv_obj_set_pos(obj, 4, 5); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3679,7 +3732,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 278); + create_user_widget_ok_cancel_widget(obj, 284); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3734,7 +3787,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj7 = obj; + objects.obj9 = obj; lv_obj_set_pos(obj, 0, 10); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3743,7 +3796,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 285); + create_user_widget_ok_cancel_widget(obj, 291); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3779,7 +3832,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj8 = obj; + objects.obj10 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3788,7 +3841,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 291); + create_user_widget_ok_cancel_widget(obj, 297); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3844,7 +3897,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj9 = obj; + objects.obj11 = obj; lv_obj_set_pos(obj, 0, 10); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3853,7 +3906,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 298); + create_user_widget_ok_cancel_widget(obj, 304); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -3950,7 +4003,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj10 = obj; + objects.obj12 = obj; lv_obj_set_pos(obj, 0, 10); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -3959,7 +4012,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 306); + create_user_widget_ok_cancel_widget(obj, 312); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } { @@ -4035,7 +4088,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj11 = obj; + objects.obj13 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -4044,7 +4097,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 314); + create_user_widget_ok_cancel_widget(obj, 320); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -4110,7 +4163,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj12 = obj; + objects.obj14 = obj; lv_obj_set_pos(obj, 0, 10); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -4119,7 +4172,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 321); + create_user_widget_ok_cancel_widget(obj, 327); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -4155,7 +4208,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj13 = obj; + objects.obj15 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -4164,7 +4217,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 327); + create_user_widget_ok_cancel_widget(obj, 333); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -4230,7 +4283,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj14 = obj; + objects.obj16 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -4239,7 +4292,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 334); + create_user_widget_ok_cancel_widget(obj, 340); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -4295,7 +4348,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj15 = obj; + objects.obj17 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -4304,7 +4357,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 342); + create_user_widget_ok_cancel_widget(obj, 348); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -4339,7 +4392,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj16 = obj; + objects.obj18 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -4348,7 +4401,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 348); + create_user_widget_ok_cancel_widget(obj, 354); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -4376,7 +4429,7 @@ void create_screen_main_screen() { lv_obj_t *parent_obj = obj; { lv_obj_t *obj = lv_label_create(parent_obj); - objects.obj17 = obj; + objects.obj19 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 200, LV_SIZE_CONTENT); lv_label_set_long_mode(obj, LV_LABEL_LONG_CLIP); @@ -4416,7 +4469,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_label_create(parent_obj); - objects.obj18 = obj; + objects.obj20 = obj; lv_obj_set_pos(obj, 0, 60); lv_obj_set_size(obj, 200, LV_SIZE_CONTENT); lv_label_set_long_mode(obj, LV_LABEL_LONG_CLIP); @@ -4484,7 +4537,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj19 = obj; + objects.obj21 = obj; lv_obj_set_pos(obj, 4, 14); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -4493,7 +4546,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 361); + create_user_widget_ok_cancel_widget(obj, 367); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } { @@ -5106,7 +5159,7 @@ void create_screen_main_screen() { { 0, 200 } }; lv_line_set_points(obj, line_points, 2); - objects.obj20 = obj; + objects.obj22 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT); lv_obj_set_style_align(obj, LV_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -5119,7 +5172,7 @@ void create_screen_main_screen() { { 200, 0 } }; lv_line_set_points(obj, line_points, 2); - objects.obj21 = obj; + objects.obj23 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT); lv_obj_set_style_align(obj, LV_ALIGN_CENTER, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -5127,7 +5180,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj22 = obj; + objects.obj24 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 200, 200); lv_obj_set_style_radius(obj, 200, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -5139,7 +5192,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj23 = obj; + objects.obj25 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 140, 140); lv_obj_set_style_radius(obj, 140, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -5151,7 +5204,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj24 = obj; + objects.obj26 = obj; lv_obj_set_pos(obj, 0, 0); lv_obj_set_size(obj, 80, 80); lv_obj_set_style_radius(obj, 80, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -6157,7 +6210,7 @@ void create_screen_main_screen() { } { lv_obj_t *obj = lv_obj_create(parent_obj); - objects.obj25 = obj; + objects.obj27 = obj; lv_obj_set_pos(obj, 4, 8); lv_obj_set_size(obj, 160, 50); lv_obj_set_style_pad_left(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); @@ -6166,7 +6219,7 @@ void create_screen_main_screen() { lv_obj_set_style_pad_bottom(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_border_width(obj, 0, LV_PART_MAIN | LV_STATE_DEFAULT); - create_user_widget_ok_cancel_widget(obj, 467); + create_user_widget_ok_cancel_widget(obj, 473); lv_obj_set_style_align(obj, LV_ALIGN_BOTTOM_MID, LV_PART_MAIN | LV_STATE_DEFAULT); } } @@ -6228,24 +6281,24 @@ void create_screen_main_screen() { } void tick_screen_main_screen() { - tick_user_widget_ok_cancel_widget(228); - tick_user_widget_ok_cancel_widget(249); + tick_user_widget_ok_cancel_widget(234); tick_user_widget_ok_cancel_widget(255); - tick_user_widget_ok_cancel_widget(263); + tick_user_widget_ok_cancel_widget(261); tick_user_widget_ok_cancel_widget(269); - tick_user_widget_ok_cancel_widget(278); - tick_user_widget_ok_cancel_widget(285); + tick_user_widget_ok_cancel_widget(275); + tick_user_widget_ok_cancel_widget(284); tick_user_widget_ok_cancel_widget(291); - tick_user_widget_ok_cancel_widget(298); - tick_user_widget_ok_cancel_widget(306); - tick_user_widget_ok_cancel_widget(314); - tick_user_widget_ok_cancel_widget(321); + tick_user_widget_ok_cancel_widget(297); + tick_user_widget_ok_cancel_widget(304); + tick_user_widget_ok_cancel_widget(312); + tick_user_widget_ok_cancel_widget(320); tick_user_widget_ok_cancel_widget(327); - tick_user_widget_ok_cancel_widget(334); - tick_user_widget_ok_cancel_widget(342); + tick_user_widget_ok_cancel_widget(333); + tick_user_widget_ok_cancel_widget(340); tick_user_widget_ok_cancel_widget(348); - tick_user_widget_ok_cancel_widget(361); - tick_user_widget_ok_cancel_widget(467); + tick_user_widget_ok_cancel_widget(354); + tick_user_widget_ok_cancel_widget(367); + tick_user_widget_ok_cancel_widget(473); } void create_screen_blank_screen() { diff --git a/generated/ui_320x240/screens.h b/generated/ui_320x240/screens.h index 833f648..eea628e 100644 --- a/generated/ui_320x240/screens.h +++ b/generated/ui_320x240/screens.h @@ -83,6 +83,12 @@ typedef struct _objects_t { lv_obj_t *progmode_button; lv_obj_t *shutdown_button; lv_obj_t *obj0; + lv_obj_t *settings_reboot_panel; + lv_obj_t *obj1; + lv_obj_t *obj2; + lv_obj_t *obj2__ok_cancel_panel_w; + lv_obj_t *obj2__ok_button_w; + lv_obj_t *obj2__cancel_button_w; lv_obj_t *button_panel; lv_obj_t *home_button; lv_obj_t *nodes_button; @@ -293,10 +299,10 @@ typedef struct _objects_t { lv_obj_t *keyboard_button_1; lv_obj_t *settings_user_long_textarea; lv_obj_t *keyboard_button_2; - lv_obj_t *obj1; - lv_obj_t *obj1__ok_cancel_panel_w; - lv_obj_t *obj1__ok_button_w; - lv_obj_t *obj1__cancel_button_w; + lv_obj_t *obj3; + lv_obj_t *obj3__ok_cancel_panel_w; + lv_obj_t *obj3__ok_button_w; + lv_obj_t *obj3__cancel_button_w; lv_obj_t *settings_channel_panel; lv_obj_t *settings_channel0_button; lv_obj_t *settings_channel0_label; @@ -314,122 +320,122 @@ typedef struct _objects_t { lv_obj_t *settings_channel6_label; lv_obj_t *settings_channel7_button; lv_obj_t *settings_channel7_label; - lv_obj_t *obj2; - lv_obj_t *obj2__ok_cancel_panel_w; - lv_obj_t *obj2__ok_button_w; - lv_obj_t *obj2__cancel_button_w; - lv_obj_t *settings_region_panel; - lv_obj_t *settings_region_dropdown; - lv_obj_t *obj3; - lv_obj_t *obj3__ok_cancel_panel_w; - lv_obj_t *obj3__ok_button_w; - lv_obj_t *obj3__cancel_button_w; - lv_obj_t *settings_modem_preset_panel; - lv_obj_t *settings_modem_preset_dropdown; - lv_obj_t *frequency_slot_label; - lv_obj_t *frequency_slot_slider; lv_obj_t *obj4; lv_obj_t *obj4__ok_cancel_panel_w; lv_obj_t *obj4__ok_button_w; lv_obj_t *obj4__cancel_button_w; - lv_obj_t *settings_device_role_panel; - lv_obj_t *settings_device_role_dropdown; + lv_obj_t *settings_region_panel; + lv_obj_t *settings_region_dropdown; lv_obj_t *obj5; lv_obj_t *obj5__ok_cancel_panel_w; lv_obj_t *obj5__ok_button_w; lv_obj_t *obj5__cancel_button_w; + lv_obj_t *settings_modem_preset_panel; + lv_obj_t *settings_modem_preset_dropdown; + lv_obj_t *frequency_slot_label; + lv_obj_t *frequency_slot_slider; + lv_obj_t *obj6; + lv_obj_t *obj6__ok_cancel_panel_w; + lv_obj_t *obj6__ok_button_w; + lv_obj_t *obj6__cancel_button_w; + lv_obj_t *settings_device_role_panel; + lv_obj_t *settings_device_role_dropdown; + lv_obj_t *obj7; + lv_obj_t *obj7__ok_cancel_panel_w; + lv_obj_t *obj7__ok_button_w; + lv_obj_t *obj7__cancel_button_w; lv_obj_t *settings_wifi_panel; lv_obj_t *settings_wifi_ssid_textarea; lv_obj_t *keyboard_button_8; lv_obj_t *settings_wifi_password_textarea; lv_obj_t *keyboard_button_9; - lv_obj_t *obj6; - lv_obj_t *obj6__ok_cancel_panel_w; - lv_obj_t *obj6__ok_button_w; - lv_obj_t *obj6__cancel_button_w; - lv_obj_t *settings_brightness_panel; - lv_obj_t *settings_brightness_label; - lv_obj_t *brightness_slider; - lv_obj_t *obj7; - lv_obj_t *obj7__ok_cancel_panel_w; - lv_obj_t *obj7__ok_button_w; - lv_obj_t *obj7__cancel_button_w; - lv_obj_t *settings_theme_panel; - lv_obj_t *settings_theme_dropdown; lv_obj_t *obj8; lv_obj_t *obj8__ok_cancel_panel_w; lv_obj_t *obj8__ok_button_w; lv_obj_t *obj8__cancel_button_w; - lv_obj_t *settings_screen_timeout_panel; - lv_obj_t *settings_screen_timeout_label; - lv_obj_t *screen_timeout_slider; + lv_obj_t *settings_brightness_panel; + lv_obj_t *settings_brightness_label; + lv_obj_t *brightness_slider; lv_obj_t *obj9; lv_obj_t *obj9__ok_cancel_panel_w; lv_obj_t *obj9__ok_button_w; lv_obj_t *obj9__cancel_button_w; - lv_obj_t *settings_screen_lock_panel; - lv_obj_t *settings_screen_lock_switch; - lv_obj_t *settings_settings_lock_switch; - lv_obj_t *settings_screen_lock_password_textarea; + lv_obj_t *settings_theme_panel; + lv_obj_t *settings_theme_dropdown; lv_obj_t *obj10; lv_obj_t *obj10__ok_cancel_panel_w; lv_obj_t *obj10__ok_button_w; lv_obj_t *obj10__cancel_button_w; - lv_obj_t *keyboard_button_7; - lv_obj_t *settings_input_control_panel; - lv_obj_t *settings_mouse_input_dropdown; - lv_obj_t *settings_keyboard_input_dropdown; + lv_obj_t *settings_screen_timeout_panel; + lv_obj_t *settings_screen_timeout_label; + lv_obj_t *screen_timeout_slider; lv_obj_t *obj11; lv_obj_t *obj11__ok_cancel_panel_w; lv_obj_t *obj11__ok_button_w; lv_obj_t *obj11__cancel_button_w; - lv_obj_t *settings_alert_buzzer_panel; - lv_obj_t *settings_alert_buzzer_switch; - lv_obj_t *settings_ringtone_dropdown; + lv_obj_t *settings_screen_lock_panel; + lv_obj_t *settings_screen_lock_switch; + lv_obj_t *settings_settings_lock_switch; + lv_obj_t *settings_screen_lock_password_textarea; lv_obj_t *obj12; lv_obj_t *obj12__ok_cancel_panel_w; lv_obj_t *obj12__ok_button_w; lv_obj_t *obj12__cancel_button_w; - lv_obj_t *settings_language_panel; - lv_obj_t *settings_language_dropdown; + lv_obj_t *keyboard_button_7; + lv_obj_t *settings_input_control_panel; + lv_obj_t *settings_mouse_input_dropdown; + lv_obj_t *settings_keyboard_input_dropdown; lv_obj_t *obj13; lv_obj_t *obj13__ok_cancel_panel_w; lv_obj_t *obj13__ok_button_w; lv_obj_t *obj13__cancel_button_w; - lv_obj_t *settings_timezone; - lv_obj_t *settings_tzzone; - lv_obj_t *settings_tzcity; + lv_obj_t *settings_alert_buzzer_panel; + lv_obj_t *settings_alert_buzzer_switch; + lv_obj_t *settings_ringtone_dropdown; lv_obj_t *obj14; lv_obj_t *obj14__ok_cancel_panel_w; lv_obj_t *obj14__ok_button_w; lv_obj_t *obj14__cancel_button_w; - lv_obj_t *settings_backup_restore_panel; - lv_obj_t *settings_backup_checkbox; - lv_obj_t *settings_restore_checkbox; - lv_obj_t *settings_backup_restore_dropdown; + lv_obj_t *settings_language_panel; + lv_obj_t *settings_language_dropdown; lv_obj_t *obj15; lv_obj_t *obj15__ok_cancel_panel_w; lv_obj_t *obj15__ok_button_w; lv_obj_t *obj15__cancel_button_w; - lv_obj_t *settings_reset_panel; - lv_obj_t *settings_reset_dropdown; + lv_obj_t *settings_timezone; + lv_obj_t *settings_tzzone; + lv_obj_t *settings_tzcity; lv_obj_t *obj16; lv_obj_t *obj16__ok_cancel_panel_w; lv_obj_t *obj16__ok_button_w; lv_obj_t *obj16__cancel_button_w; - lv_obj_t *settings_modify_channel_panel; + lv_obj_t *settings_backup_restore_panel; + lv_obj_t *settings_backup_checkbox; + lv_obj_t *settings_restore_checkbox; + lv_obj_t *settings_backup_restore_dropdown; lv_obj_t *obj17; + lv_obj_t *obj17__ok_cancel_panel_w; + lv_obj_t *obj17__ok_button_w; + lv_obj_t *obj17__cancel_button_w; + lv_obj_t *settings_reset_panel; + lv_obj_t *settings_reset_dropdown; + lv_obj_t *obj18; + lv_obj_t *obj18__ok_cancel_panel_w; + lv_obj_t *obj18__ok_button_w; + lv_obj_t *obj18__cancel_button_w; + lv_obj_t *settings_modify_channel_panel; + lv_obj_t *obj19; lv_obj_t *settings_modify_channel_name_textarea; lv_obj_t *keyboard_button_3; - lv_obj_t *obj18; + lv_obj_t *obj20; lv_obj_t *settings_modify_channel_psk_textarea; lv_obj_t *settings_modify_channel_key_generate_button; lv_obj_t *keyboard_button_4; lv_obj_t *settings_modify_trash_button; - lv_obj_t *obj19; - lv_obj_t *obj19__ok_cancel_panel_w; - lv_obj_t *obj19__ok_button_w; - lv_obj_t *obj19__cancel_button_w; + lv_obj_t *obj21; + lv_obj_t *obj21__ok_cancel_panel_w; + lv_obj_t *obj21__ok_button_w; + lv_obj_t *obj21__cancel_button_w; lv_obj_t *settings_modify_channel_qr_panel; lv_obj_t *settings_modify_channel_qr_button; lv_obj_t *node_options_panel; @@ -467,11 +473,11 @@ typedef struct _objects_t { lv_obj_t *mesh_detector_panel; lv_obj_t *detector_radar_panel; lv_obj_t *radar_beam; - lv_obj_t *obj20; - lv_obj_t *obj21; lv_obj_t *obj22; lv_obj_t *obj23; lv_obj_t *obj24; + lv_obj_t *obj25; + lv_obj_t *obj26; lv_obj_t *detector_heard_label; lv_obj_t *detector_contact_button; lv_obj_t *detector_contact_image; @@ -532,10 +538,10 @@ typedef struct _objects_t { lv_obj_t *keyboard_button_10; lv_obj_t *setup_user_long_textarea; lv_obj_t *keyboard_button_11; - lv_obj_t *obj25; - lv_obj_t *obj25__ok_cancel_panel_w; - lv_obj_t *obj25__ok_button_w; - lv_obj_t *obj25__cancel_button_w; + lv_obj_t *obj27; + lv_obj_t *obj27__ok_cancel_panel_w; + lv_obj_t *obj27__ok_button_w; + lv_obj_t *obj27__cancel_button_w; lv_obj_t *alert_panel; lv_obj_t *alert_label; lv_obj_t *keyboard; diff --git a/include/graphics/view/TFT/TFTView_320x240.h b/include/graphics/view/TFT/TFTView_320x240.h index c61939e..79dc35d 100644 --- a/include/graphics/view/TFT/TFTView_320x240.h +++ b/include/graphics/view/TFT/TFTView_320x240.h @@ -107,6 +107,7 @@ class TFTView_320x240 : public MeshtasticView eBackupRestore, eReset, eReboot, + eDisplayMode, eModifyChannel }; diff --git a/source/graphics/TFT/TFTView_320x240.cpp b/source/graphics/TFT/TFTView_320x240.cpp index d9e8d77..8d070a2 100644 --- a/source/graphics/TFT/TFTView_320x240.cpp +++ b/source/graphics/TFT/TFTView_320x240.cpp @@ -746,7 +746,7 @@ void TFTView_320x240::ui_events_init(void) lv_obj_add_event_cb(objects.basic_settings_reboot_button, ui_event_reboot_button, LV_EVENT_CLICKED, NULL); lv_obj_add_event_cb(objects.reboot_button, ui_event_device_reboot_button, LV_EVENT_CLICKED, NULL); - lv_obj_add_event_cb(objects.progmode_button, ui_event_device_progmode_button, LV_EVENT_CLICKED, NULL); + lv_obj_add_event_cb(objects.progmode_button, ui_event_device_progmode_button, LV_EVENT_ALL, NULL); lv_obj_add_event_cb(objects.shutdown_button, ui_event_device_shutdown_button, LV_EVENT_CLICKED, NULL); lv_obj_add_event_cb(objects.cancel_reboot_button, ui_event_device_cancel_button, LV_EVENT_CLICKED, NULL); @@ -760,8 +760,6 @@ void TFTView_320x240::ui_events_init(void) lv_obj_add_event_cb(objects.setup_region_dropdown, ui_event_setup_region_dropdown, LV_EVENT_VALUE_CHANGED, NULL); // OK / Cancel widget for basic settings dialog - lv_obj_add_event_cb(objects.obj1__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); - lv_obj_add_event_cb(objects.obj1__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); lv_obj_add_event_cb(objects.obj2__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); lv_obj_add_event_cb(objects.obj2__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); lv_obj_add_event_cb(objects.obj3__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); @@ -792,10 +790,14 @@ void TFTView_320x240::ui_events_init(void) lv_obj_add_event_cb(objects.obj15__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); lv_obj_add_event_cb(objects.obj16__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); lv_obj_add_event_cb(objects.obj16__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); - lv_obj_add_event_cb(objects.obj19__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); - lv_obj_add_event_cb(objects.obj19__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); - lv_obj_add_event_cb(objects.obj25__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); - lv_obj_add_event_cb(objects.obj25__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); + lv_obj_add_event_cb(objects.obj17__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); + lv_obj_add_event_cb(objects.obj17__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); + lv_obj_add_event_cb(objects.obj18__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); + lv_obj_add_event_cb(objects.obj18__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); + lv_obj_add_event_cb(objects.obj21__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); + lv_obj_add_event_cb(objects.obj21__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); + lv_obj_add_event_cb(objects.obj27__ok_button_w, ui_event_ok, LV_EVENT_CLICKED, 0); + lv_obj_add_event_cb(objects.obj27__cancel_button_w, ui_event_cancel, LV_EVENT_CLICKED, 0); // modify channel buttons lv_obj_add_event_cb(objects.settings_channel0_button, ui_event_modify_channel, LV_EVENT_ALL, (void *)0); @@ -1107,6 +1109,7 @@ void TFTView_320x240::ui_event_MapButton(lv_event_t *e) } else { THIS->ui_set_active(objects.map_button, objects.map_panel, objects.top_map_panel); THIS->loadMap(); + lv_group_focus_obj(objects.nav_button); } lv_obj_add_flag(objects.map_osd_panel, LV_OBJ_FLAG_HIDDEN); } else if (event_code == LV_EVENT_LONG_PRESSED && THIS->activeSettings == eNone) { @@ -1949,18 +1952,37 @@ void TFTView_320x240::ui_event_device_reboot_button(lv_event_t *e) void TFTView_320x240::ui_event_device_progmode_button(lv_event_t *e) { - meshtastic_Config_NetworkConfig &network = THIS->db.config.network; - if (network.wifi_enabled) { - network.wifi_enabled = false; - THIS->controller->sendConfig(meshtastic_Config_NetworkConfig{network}); + static bool ignoreClicked = false; + lv_event_code_t event_code = lv_event_get_code(e); + if (event_code == LV_EVENT_CLICKED) { + if (ignoreClicked) { // prevent long press to enter this setting + ignoreClicked = false; + return; + } + + meshtastic_Config_NetworkConfig &network = THIS->db.config.network; + if (network.wifi_enabled) { + network.wifi_enabled = false; + THIS->controller->sendConfig(meshtastic_Config_NetworkConfig{network}); + } + meshtastic_Config_BluetoothConfig &bluetooth = THIS->db.config.bluetooth; + bluetooth.mode = meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN; + bluetooth.fixed_pin = random(100000, 999999); + bluetooth.enabled = true; + THIS->controller->sendConfig(meshtastic_Config_BluetoothConfig{bluetooth}, THIS->ownNode); + lv_screen_load_anim(objects.blank_screen, LV_SCR_LOAD_ANIM_FADE_OUT, 4000, 1000, false); + lv_obj_add_flag(objects.reboot_panel, LV_OBJ_FLAG_HIDDEN); + } else if (event_code == LV_EVENT_LONG_PRESSED) { + if (!THIS->controller->isStandalone()) { +#if defined(HAS_SCREEN) && HAS_SCREEN == 1 + ignoreClicked = true; + // open dialog + lv_obj_remove_flag(objects.settings_reboot_panel, LV_OBJ_FLAG_HIDDEN); + lv_group_focus_obj(objects.settings_reboot_panel); + THIS->activeSettings = eDisplayMode; +#endif + } } - meshtastic_Config_BluetoothConfig &bluetooth = THIS->db.config.bluetooth; - bluetooth.mode = meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN; - bluetooth.fixed_pin = random(100000, 999999); - bluetooth.enabled = true; - THIS->controller->sendConfig(meshtastic_Config_BluetoothConfig{bluetooth}, THIS->ownNode); - lv_screen_load_anim(objects.blank_screen, LV_SCR_LOAD_ANIM_FADE_OUT, 4000, 1000, false); - lv_obj_add_flag(objects.reboot_panel, LV_OBJ_FLAG_HIDDEN); } void TFTView_320x240::ui_event_device_shutdown_button(lv_event_t *e) @@ -3971,6 +3993,16 @@ void TFTView_320x240::ui_event_ok(lv_event_t *e) lv_group_focus_obj(objects.basic_settings_reset_button); break; } + case eDisplayMode: { + meshtastic_Config_DisplayConfig &display = THIS->db.config.display; + display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT; + THIS->controller->sendConfig(meshtastic_Config_DisplayConfig{display}, THIS->ownNode); + THIS->controller->requestReboot(5, THIS->ownNode); + lv_screen_load_anim(objects.blank_screen, LV_SCR_LOAD_ANIM_FADE_OUT, 4000, 1000, false); + lv_obj_add_flag(objects.reboot_panel, LV_OBJ_FLAG_HIDDEN); + lv_obj_add_flag(objects.settings_reboot_panel, LV_OBJ_FLAG_HIDDEN); + break; + } case eModifyChannel: { meshtastic_ChannelSettings_psk_t psk = {}; const char *name = lv_textarea_get_text(objects.settings_modify_channel_name_textarea); @@ -4118,6 +4150,11 @@ void TFTView_320x240::ui_event_cancel(lv_event_t *e) lv_group_focus_obj(objects.basic_settings_reset_button); break; } + case TFTView_320x240::eDisplayMode: { + lv_obj_add_flag(objects.settings_reboot_panel, LV_OBJ_FLAG_HIDDEN); + lv_group_focus_obj(objects.basic_settings_reset_button); + break; + } case TFTView_320x240::eModifyChannel: { lv_obj_add_flag(objects.settings_modify_channel_panel, LV_OBJ_FLAG_HIDDEN); lv_group_focus_obj(objects.settings_channel0_button); @@ -5719,6 +5756,11 @@ void TFTView_320x240::updateDisplayConfig(const meshtastic_Config_DisplayConfig { db.config.display = cfg; db.config.has_display = true; + if (cfg.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) { + meshtastic_Config_DisplayConfig &display = db.config.display; + display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT; + THIS->controller->sendConfig(meshtastic_Config_DisplayConfig{display}, THIS->ownNode); + } } void TFTView_320x240::updateLoRaConfig(const meshtastic_Config_LoRaConfig &cfg) diff --git a/studio/320x240/TFT320x240.eez-project b/studio/320x240/TFT320x240.eez-project index 7517edf..5ed3ac7 100644 --- a/studio/320x240/TFT320x240.eez-project +++ b/studio/320x240/TFT320x240.eez-project @@ -744,6 +744,162 @@ "textType": "literal", "longMode": "WRAP", "recolor": false + }, + { + "objID": "5f74af31-d4d1-43bd-9d40-40c541c9f745", + "type": "LVGLPanelWidget", + "left": 0, + "top": 12, + "width": 240, + "height": 120, + "customInputs": [], + "customOutputs": [], + "style": { + "objID": "c88fc7c2-9edd-4a50-bde1-872df4754d9a", + "useStyle": "default", + "conditionalStyles": [], + "childStyles": [] + }, + "hiddenInEditor": false, + "timeline": [], + "eventHandlers": [], + "identifier": "SettingsRebootPanel", + "leftUnit": "%", + "topUnit": "%", + "widthUnit": "px", + "heightUnit": "px", + "children": [ + { + "objID": "7d4036b4-f5fd-4039-a824-606c7429eb5a", + "type": "LVGLLabelWidget", + "left": 0, + "top": 20, + "width": 200, + "height": 22, + "customInputs": [], + "customOutputs": [], + "style": { + "objID": "3f385429-fa37-4865-fc2d-a86097228884", + "useStyle": "default", + "conditionalStyles": [], + "childStyles": [] + }, + "hiddenInEditor": false, + "timeline": [], + "eventHandlers": [], + "leftUnit": "px", + "topUnit": "px", + "widthUnit": "px", + "heightUnit": "content", + "children": [], + "widgetFlags": "CLICK_FOCUSABLE|GESTURE_BUBBLE|PRESS_LOCK|SCROLLABLE|SCROLL_CHAIN_HOR|SCROLL_CHAIN_VER|SCROLL_ELASTIC|SCROLL_MOMENTUM|SCROLL_WITH_ARROW|SNAPPABLE", + "hiddenFlag": false, + "hiddenFlagType": "literal", + "clickableFlagType": "literal", + "checkedStateType": "literal", + "disabledStateType": "literal", + "states": "", + "localStyles": { + "objID": "d6c08e84-6cad-4372-f62b-5313a07f2ce6", + "definition": { + "MAIN": { + "DEFAULT": { + "align": "TOP_MID", + "text_align": "CENTER", + "text_opa": 200, + "text_color": "#ff5858", + "text_font": "montserrat_16" + }, + "DISABLED": { + "align": "TOP_LEFT" + } + } + } + }, + "groupIndex": 0, + "text": "Reboot into former UI ?", + "textType": "translated-literal", + "longMode": "CLIP", + "recolor": false + }, + { + "objID": "8690a9d6-fc5c-444e-91d5-197ae98ab126", + "type": "LVGLUserWidgetWidget", + "left": 4, + "top": 5, + "width": 160, + "height": 50, + "customInputs": [], + "customOutputs": [], + "style": { + "objID": "e73526c7-e166-4e7b-9f47-8fa234008c82", + "useStyle": "default", + "conditionalStyles": [], + "childStyles": [] + }, + "hiddenInEditor": false, + "timeline": [], + "eventHandlers": [], + "leftUnit": "px", + "topUnit": "px", + "widthUnit": "px", + "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", + "clickableFlag": true, + "clickableFlagType": "literal", + "checkedStateType": "literal", + "disabledStateType": "literal", + "states": "", + "localStyles": { + "objID": "808bf419-4d6d-4535-8099-6d7e12eacd0d", + "definition": { + "MAIN": { + "DEFAULT": { + "align": "BOTTOM_MID" + } + } + } + }, + "groupIndex": 0, + "userWidgetPageName": "OkCancelWidget", + "userPropertyValues": { + "objID": "8c5510a4-61d0-4e2c-985c-69e4a7c62319", + "values": {} + } + } + ], + "widgetFlags": "CLICK_FOCUSABLE|GESTURE_BUBBLE|PRESS_LOCK|SCROLL_CHAIN_HOR|SCROLL_CHAIN_VER|SCROLL_ELASTIC|SCROLL_MOMENTUM|SCROLL_WITH_ARROW|SNAPPABLE", + "hiddenFlag": true, + "hiddenFlagType": "literal", + "clickableFlag": true, + "clickableFlagType": "literal", + "checkedStateType": "literal", + "disabledStateType": "literal", + "states": "", + "useStyle": "SettingsPanelStyle", + "localStyles": { + "objID": "e530233e-99f3-4ec3-f4b3-7bb9d8cfd5fc", + "definition": { + "MAIN": { + "DEFAULT": { + "border_width": 2, + "radius": 12, + "border_color": "#216ad8", + "align": "TOP_MID", + "border_opa": 255, + "bg_opa": 250, + "layout": "NONE", + "pad_top": 6, + "pad_bottom": 10, + "pad_left": 5, + "pad_right": 5 + } + } + } + }, + "groupIndex": 0 } ], "widgetFlags": "CLICK_FOCUSABLE|GESTURE_BUBBLE|PRESS_LOCK|SCROLLABLE|SCROLL_CHAIN_HOR|SCROLL_CHAIN_VER|SCROLL_ELASTIC|SCROLL_MOMENTUM|SCROLL_WITH_ARROW|SNAPPABLE", @@ -15775,7 +15931,7 @@ "conditionalStyles": [], "childStyles": [] }, - "hiddenInEditor": true, + "hiddenInEditor": false, "timeline": [], "eventHandlers": [], "identifier": "SettingsResetPanel", @@ -15799,7 +15955,7 @@ "conditionalStyles": [], "childStyles": [] }, - "hiddenInEditor": true, + "hiddenInEditor": false, "timeline": [], "eventHandlers": [], "identifier": "SettingsResetDropdown", @@ -15850,7 +16006,7 @@ "conditionalStyles": [], "childStyles": [] }, - "hiddenInEditor": true, + "hiddenInEditor": false, "timeline": [], "eventHandlers": [], "leftUnit": "px",