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_8.py (608B)
1 # 2 # Using the text style properties 3 # 4 5 style = lv.style_t() 6 style.init() 7 8 style.set_radius(5) 9 style.set_bg_opa(lv.OPA.COVER) 10 style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 3)) 11 style.set_border_width(2) 12 style.set_border_color(lv.palette_main(lv.PALETTE.BLUE)) 13 style.set_pad_all(10) 14 15 style.set_text_color(lv.palette_main(lv.PALETTE.BLUE)) 16 style.set_text_letter_space(5) 17 style.set_text_line_space(20) 18 style.set_text_decor(lv.TEXT_DECOR.UNDERLINE) 19 20 # Create an object with the new style 21 obj = lv.label(lv.scr_act()) 22 obj.add_style(style, 0) 23 obj.set_text("Text of\n" 24 "a label") 25 26 obj.center() 27