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_3.py (545B)

      1 #
      2 # Using the border style properties
      3 #
      4 style = lv.style_t()
      5 style.init()
      6 
      7 # Set a background color and a radius
      8 style.set_radius(10)
      9 style.set_bg_opa(lv.OPA.COVER)
     10 style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 1))
     11 
     12 # Add border to the bottom+right
     13 style.set_border_color(lv.palette_main(lv.PALETTE.BLUE))
     14 style.set_border_width(5)
     15 style.set_border_opa(lv.OPA._50)
     16 style.set_border_side(lv.BORDER_SIDE.BOTTOM | lv.BORDER_SIDE.RIGHT)
     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()