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_5.py (480B)
1 # 2 # Using the Shadow style properties 3 # 4 5 style = lv.style_t() 6 style.init() 7 8 # Set a background color and a radius 9 style.set_radius(5) 10 style.set_bg_opa(lv.OPA.COVER) 11 style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 1)) 12 13 # Add a shadow 14 style.set_shadow_width(8) 15 style.set_shadow_color(lv.palette_main(lv.PALETTE.BLUE)) 16 style.set_shadow_ofs_x(10) 17 style.set_shadow_ofs_y(20) 18 19 # Create an object with the new style 20 obj = lv.obj(lv.scr_act()) 21 obj.add_style(style, 0) 22 obj.center()