1#
2# Using the outline style properties
3#
4
5style = lv.style_t()
6style.init()
7
8# Set a background color and a radius
9style.set_radius(5)
10style.set_bg_opa(lv.OPA.COVER)
11style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 1))
12
13# Add outline
14style.set_outline_width(2)
15style.set_outline_color(lv.palette_main(lv.PALETTE.BLUE))
16style.set_outline_pad(8)
17
18# Create an object with the new style
19obj = lv.obj(lv.scr_act())
20obj.add_style(style, 0)
21obj.center()
22