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_style_13.py (676B)
1 # 2 # Add styles to parts and states 3 # 4 5 style_indic = lv.style_t() 6 style_indic.init() 7 style_indic.set_bg_color(lv.palette_lighten(lv.PALETTE.RED, 3)) 8 style_indic.set_bg_grad_color(lv.palette_main(lv.PALETTE.RED)) 9 style_indic.set_bg_grad_dir(lv.GRAD_DIR.HOR) 10 11 style_indic_pr = lv.style_t() 12 style_indic_pr.init() 13 style_indic_pr.set_shadow_color(lv.palette_main(lv.PALETTE.RED)) 14 style_indic_pr.set_shadow_width(10) 15 style_indic_pr.set_shadow_spread(3) 16 17 # Create an object with the new style_pr 18 obj = lv.slider(lv.scr_act()) 19 obj.add_style(style_indic, lv.PART.INDICATOR) 20 obj.add_style(style_indic_pr, lv.PART.INDICATOR | lv.STATE.PRESSED) 21 obj.set_value(70, lv.ANIM.OFF) 22 obj.center()