mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-17 11:58:54 +00:00
first commit
This commit is contained in:
@@ -976,6 +976,59 @@ void setup_scr_scene(lv_ui *ui)
|
||||
lv_img_set_src(ui->scene_scenes_page_icon, LVGL_PATH(page_sw1_42x22.png));
|
||||
}
|
||||
//The custom code of scene.
|
||||
//Write codes scene_alarmtimecont
|
||||
ui->scene_alarmtimecont = lv_obj_create(ui->scene);
|
||||
lv_obj_set_pos(ui->scene_alarmtimecont, 115, 340);
|
||||
lv_obj_set_size(ui->scene_alarmtimecont, 250, 36);
|
||||
lv_obj_set_scrollbar_mode(ui->scene_alarmtimecont, LV_SCROLLBAR_MODE_OFF);
|
||||
|
||||
//Write style for scene_alarmtimecont, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->scene_alarmtimecont, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->scene_alarmtimecont, 170, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->scene_alarmtimecont, lv_color_hex(0x00A8FF), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->scene_alarmtimecont, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->scene_alarmtimecont, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes scene_img_13
|
||||
ui->scene_img_13 = lv_img_create(ui->scene_alarmtimecont);
|
||||
lv_obj_add_flag(ui->scene_img_13, LV_OBJ_FLAG_CLICKABLE);
|
||||
lv_img_set_src(ui->scene_img_13, LVGL_PATH(alarmtime.png));
|
||||
lv_img_set_pivot(ui->scene_img_13, 50,50);
|
||||
lv_img_set_angle(ui->scene_img_13, 0);
|
||||
lv_obj_set_pos(ui->scene_img_13, 6, 4);
|
||||
lv_obj_set_size(ui->scene_img_13, 28, 28);
|
||||
|
||||
//Write style for scene_img_13, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_img_opa(ui->scene_img_13, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes scene_label_12
|
||||
ui->scene_label_12 = lv_label_create(ui->scene_alarmtimecont);
|
||||
//lv_label_set_text(ui->scene_label_12, "The currt time may be wrong, \nyou need to set the time manually.");
|
||||
lv_label_set_text(ui->scene_label_12,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_power_date_alarm]);
|
||||
lv_label_set_long_mode(ui->scene_label_12, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->scene_label_12, 38, 6);
|
||||
lv_obj_set_size(ui->scene_label_12, 210, 28);
|
||||
|
||||
//Write style for scene_label_12, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->scene_label_12, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->scene_label_12, &lv_font_albbhptR_12, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->scene_label_12, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->scene_label_12, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->scene_label_12, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Update current screen layout.
|
||||
lv_obj_update_layout(ui->scene);
|
||||
|
||||
Reference in New Issue
Block a user