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_1.py (412B)

      1 #
      2 # Using the Size, Position and Padding style properties
      3 #
      4 style = lv.style_t()
      5 style.init()
      6 style.set_radius(5)
      7 
      8 # Make a gradient
      9 style.set_width(150)
     10 style.set_height(lv.SIZE.CONTENT)
     11 
     12 style.set_pad_ver(20)
     13 style.set_pad_left(5)
     14 
     15 style.set_x(lv.pct(50))
     16 style.set_y(80)
     17 
     18 # Create an object with the new style
     19 obj = lv.obj(lv.scr_act())
     20 obj.add_style(style, 0)
     21 
     22 label = lv.label(obj)
     23 label.set_text("Hello")
     24