-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstat_line.be
16 lines (15 loc) · 1.14 KB
/
stat_line.be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#- Upper state line -#
stat_line = lv.label(scr)
if f20 != nil stat_line.set_style_text_font(f20, lv.PART_MAIN | lv.STATE_DEFAULT) end
stat_line.set_long_mode(lv.LABEL_LONG_SCROLL) # auto scrolling if text does not fit
stat_line.set_width(hres)
stat_line.set_align(lv.TEXT_ALIGN_LEFT) # align text left
stat_line.set_style_bg_color(lv.color(0xD00000), lv.PART_MAIN | lv.STATE_DEFAULT) # background #000088
stat_line.set_style_bg_opa(lv.OPA_COVER, lv.PART_MAIN | lv.STATE_DEFAULT) # 100% background opacity
stat_line.set_style_text_color(lv.color(0xFFFFFF), lv.PART_MAIN | lv.STATE_DEFAULT) # text color #FFFFFF
stat_line.set_text(" Luchtkwaliteit")
stat_line.refr_size() # new in LVGL8
stat_line.refr_pos() # new in LVGL8
#- display wifi strength indicator icon (for professionals ;) -#
wifi_icon = lv_wifi_arcs_icon(stat_line) # the widget takes care of positioning and driver stuff
clock_icon = lv_clock_icon(stat_line)