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_bar_5.py (615B)

      1 #
      2 # Bar with LTR and RTL base direction
      3 #
      4 
      5 bar_ltr = lv.bar(lv.scr_act())
      6 bar_ltr.set_size(200, 20)
      7 bar_ltr.set_value(70, lv.ANIM.OFF)
      8 bar_ltr.align(lv.ALIGN.CENTER, 0, -30)
      9 
     10 label = lv.label(lv.scr_act())
     11 label.set_text("Left to Right base direction")
     12 label.align_to(bar_ltr, lv.ALIGN.OUT_TOP_MID, 0, -5)
     13 
     14 bar_rtl = lv.bar(lv.scr_act())
     15 bar_rtl.set_style_base_dir(lv.BASE_DIR.RTL,0)
     16 bar_rtl.set_size(200, 20)
     17 bar_rtl.set_value(70, lv.ANIM.OFF)
     18 bar_rtl.align(lv.ALIGN.CENTER, 0, 30)
     19 
     20 label = lv.label(lv.scr_act())
     21 label.set_text("Right to Left base direction")
     22 label.align_to(bar_rtl, lv.ALIGN.OUT_TOP_MID, 0, -5)