《陈情令》幕后:那些年,我们一起追过的“桃子”与“忘羡”

核心内容摘要

我被迫成为玩具测试员:一场啼笑皆非的奇遇
18馃埐馃埐:解锁心动瞬间,点燃无限可能

鞠婧祎被c黄扒衣服17c?揭秘“四千年美女”最撩人的瞬间,美到窒息!

这一期讲解的控件是进度条文本控件textprogress是 LVGL 库中的一个组件用于显示进度文本的控件。

如上图所示在GUI_guider中进度文本控件的使用将控件拖拽到画布中然后在右侧的属性列表中更改配置进度文本的数值范围、数值的步数以及进度文本的初始值和位数显示。

下图是根据右侧属性列表配置得到的。

以下是代码的实例解析//Write codes screen_1_textprogress_1//创建控件ui-screen_1_textprogress_1 lv_textprogress_create(ui-screen_

;//设置进度文本的数值范围lv_textprogress_set_range_value(ui-screen_1_textprogress_1, 0, 100, 0,

;//设置两位有效数字显示lv_textprogress_set_decimal(ui-screen_1_textprogress_1,

;//设置初始值为0lv_textprogress_set_value(ui-screen_1_textprogress_1,

;//设置位置以及大小lv_obj_set_pos(ui-screen_1_textprogress_1, 185,

;lv_obj_set_size(ui-screen_1_textprogress_1, 100,

;//Write style for screen_1_textprogress_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. //设置边框半径0直角矩形lv_obj_set_style_radius(ui-screen_1_textprogress_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);//文本颜色黑色#000000lv_obj_set_style_text_color(ui-screen_1_textprogress_1, lv_color_hex(0x

, LV_PART_MAIN|LV_STATE_DEFAULT);//字体Alatsi Regular ,大小22lv_obj_set_style_text_font(ui-screen_1_textprogress_1, lv_font_Alatsi_Regular_22, LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_text_opa(ui-screen_1_textprogress_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);//字母间距2pxlv_obj_set_style_text_letter_space(ui-screen_1_textprogress_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);//文本对齐居中lv_obj_set_style_text_align(ui-screen_1_textprogress_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_bg_opa(ui-screen_1_textprogress_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);//背景颜色白色#FFFFFFlv_obj_set_style_bg_color(ui-screen_1_textprogress_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_bg_grad_dir(ui-screen_1_textprogress_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);//顶部内边距8px 其他三边内边距:0lv_obj_set_style_pad_top(ui-screen_1_textprogress_1, 8, LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_pad_right(ui-screen_1_textprogress_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_pad_bottom(ui-screen_1_textprogress_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_pad_left(ui-screen_1_textprogress_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);//阴影宽度1pxlv_obj_set_style_shadow_width(ui-screen_1_textprogress_1, 1, LV_PART_MAIN|LV_STATE_DEFAULT);//阴影颜色黑色lv_obj_set_style_shadow_color(ui-screen_1_textprogress_1, lv_color_hex(0x

, LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_shadow_opa(ui-screen_1_textprogress_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);//阴影扩散2pxlv_obj_set_style_shadow_spread(ui-screen_1_textprogress_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_shadow_ofs_x(ui-screen_1_textprogress_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);lv_obj_set_style_shadow_ofs_y(ui-screen_1_textprogress_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);本文章由威三学社出品对课程感兴趣可以私信联系

Konoha Training汉化下载-Konoha Training汉化下载应用

百度百家号客服电话人工服务

123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123