acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
lv_example_bar_2.py (669B)
1 # 2 # Example of styling the bar 3 # 4 style_bg = lv.style_t() 5 style_indic = lv.style_t() 6 7 style_bg.init() 8 style_bg.set_border_color(lv.palette_main(lv.PALETTE.BLUE)) 9 style_bg.set_border_width(2) 10 style_bg.set_pad_all(6) # To make the indicator smaller 11 style_bg.set_radius(6) 12 style_bg.set_anim_time(1000) 13 14 style_indic.init() 15 style_indic.set_bg_opa(lv.OPA.COVER) 16 style_indic.set_bg_color(lv.palette_main(lv.PALETTE.BLUE)) 17 style_indic.set_radius(3) 18 19 bar = lv.bar(lv.scr_act()) 20 bar.remove_style_all() # To have a clean start 21 bar.add_style(style_bg, 0) 22 bar.add_style(style_indic, lv.PART.INDICATOR) 23 24 bar.set_size(200, 20) 25 bar.center() 26 bar.set_value(100, lv.ANIM.ON) 27