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_4.py (453B)

      1 #
      2 # Using the outline 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 outline
     14 style.set_outline_width(2)
     15 style.set_outline_color(lv.palette_main(lv.PALETTE.BLUE))
     16 style.set_outline_pad(8)
     17 
     18 # Create an object with the new style
     19 obj = lv.obj(lv.scr_act())
     20 obj.add_style(style, 0)
     21 obj.center()