修改界面,增加返回按键
This commit is contained in:
parent
075c626788
commit
ce008f7519
@ -131,24 +131,6 @@ void setup_scr_screen_imglist(lv_ui *ui)
|
|||||||
lv_style_set_bg_color(&style_screen_imglist_list_1_extra_btns_main_default, lv_color_hex(0xffffff));
|
lv_style_set_bg_color(&style_screen_imglist_list_1_extra_btns_main_default, lv_color_hex(0xffffff));
|
||||||
lv_style_set_bg_grad_dir(&style_screen_imglist_list_1_extra_btns_main_default, LV_GRAD_DIR_NONE);
|
lv_style_set_bg_grad_dir(&style_screen_imglist_list_1_extra_btns_main_default, LV_GRAD_DIR_NONE);
|
||||||
|
|
||||||
//Write style state: LV_STATE_DEFAULT for &style_screen_imglist_list_1_extra_texts_main_default
|
|
||||||
static lv_style_t style_screen_imglist_list_1_extra_texts_main_default;
|
|
||||||
ui_init_style(&style_screen_imglist_list_1_extra_texts_main_default);
|
|
||||||
|
|
||||||
lv_style_set_pad_top(&style_screen_imglist_list_1_extra_texts_main_default, 5);
|
|
||||||
lv_style_set_pad_left(&style_screen_imglist_list_1_extra_texts_main_default, 5);
|
|
||||||
lv_style_set_pad_right(&style_screen_imglist_list_1_extra_texts_main_default, 5);
|
|
||||||
lv_style_set_pad_bottom(&style_screen_imglist_list_1_extra_texts_main_default, 5);
|
|
||||||
lv_style_set_border_width(&style_screen_imglist_list_1_extra_texts_main_default, 0);
|
|
||||||
lv_style_set_text_color(&style_screen_imglist_list_1_extra_texts_main_default, lv_color_hex(0x0D3055));
|
|
||||||
lv_style_set_text_font(&style_screen_imglist_list_1_extra_texts_main_default, &lv_font_GB2312_12);
|
|
||||||
lv_style_set_text_opa(&style_screen_imglist_list_1_extra_texts_main_default, 255);
|
|
||||||
lv_style_set_radius(&style_screen_imglist_list_1_extra_texts_main_default, 3);
|
|
||||||
lv_style_set_transform_width(&style_screen_imglist_list_1_extra_texts_main_default, 0);
|
|
||||||
lv_style_set_bg_opa(&style_screen_imglist_list_1_extra_texts_main_default, 255);
|
|
||||||
lv_style_set_bg_color(&style_screen_imglist_list_1_extra_texts_main_default, lv_color_hex(0xffffff));
|
|
||||||
lv_style_set_bg_grad_dir(&style_screen_imglist_list_1_extra_texts_main_default, LV_GRAD_DIR_NONE);
|
|
||||||
// lv_obj_add_style(ui->screen_imglist_list_1_item0, &style_screen_imglist_list_1_extra_texts_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
|
||||||
|
|
||||||
//Write codes screen_imglist_ddlist_1
|
//Write codes screen_imglist_ddlist_1
|
||||||
ui->screen_imglist_ddlist_1 = lv_dropdown_create(ui->screen_imglist);
|
ui->screen_imglist_ddlist_1 = lv_dropdown_create(ui->screen_imglist);
|
||||||
@ -215,10 +197,35 @@ void setup_scr_screen_imglist(lv_ui *ui)
|
|||||||
lv_style_set_bg_grad_dir(&style_screen_imglist_ddlist_1_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
|
lv_style_set_bg_grad_dir(&style_screen_imglist_ddlist_1_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);
|
||||||
lv_obj_add_style(lv_dropdown_get_list(ui->screen_imglist_ddlist_1), &style_screen_imglist_ddlist_1_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_add_style(lv_dropdown_get_list(ui->screen_imglist_ddlist_1), &style_screen_imglist_ddlist_1_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write codes screen_imglist_btn_1
|
||||||
|
ui->screen_imglist_btn_1 = lv_btn_create(ui->screen_imglist);
|
||||||
|
ui->screen_imglist_btn_1_label = lv_label_create(ui->screen_imglist_btn_1);
|
||||||
|
lv_label_set_text(ui->screen_imglist_btn_1_label, "" LV_SYMBOL_LEFT " ");
|
||||||
|
lv_label_set_long_mode(ui->screen_imglist_btn_1_label, LV_LABEL_LONG_WRAP);
|
||||||
|
lv_obj_align(ui->screen_imglist_btn_1_label, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
lv_obj_set_style_pad_all(ui->screen_imglist_btn_1, 0, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_width(ui->screen_imglist_btn_1_label, LV_PCT(100));
|
||||||
|
lv_obj_set_pos(ui->screen_imglist_btn_1, 2, 1);
|
||||||
|
lv_obj_set_size(ui->screen_imglist_btn_1, 16, 14);
|
||||||
|
|
||||||
|
//Write style for screen_imglist_btn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_imglist_btn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_color(ui->screen_imglist_btn_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_grad_dir(ui->screen_imglist_btn_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_border_width(ui->screen_imglist_btn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_radius(ui->screen_imglist_btn_1, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_shadow_width(ui->screen_imglist_btn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_color(ui->screen_imglist_btn_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_font(ui->screen_imglist_btn_1, &lv_font_GB2312_12, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_opa(ui->screen_imglist_btn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_align(ui->screen_imglist_btn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
//The custom code of screen_imglist.
|
//The custom code of screen_imglist.
|
||||||
|
|
||||||
|
|
||||||
//Update current screen layout.
|
//Update current screen layout.
|
||||||
lv_obj_update_layout(ui->screen_imglist);
|
lv_obj_update_layout(ui->screen_imglist);
|
||||||
|
|
||||||
|
//Init events for screen.
|
||||||
|
// events_init_screen_imglist(ui);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user