-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
Here is my test code:
import os, sys, io
import M5
from M5 import *
import m5ui
import lvgl as lv
M5.begin()
M5.Lcd.setRotation(1)
m5ui.init()
scr0 = lv.obj()
scr0.set_style_bg_color(lv.color_hex(0xffffff), lv.PART.MAIN | lv.STATE.DEFAULT)
button0 = lv.button(scr0)
button0.set_pos(101, 79)
button0.set_style_bg_color(lv.color_hex(0x2196f3), lv.PART.MAIN | lv.STATE.DEFAULT)
button0.set_style_bg_opa(255, lv.PART.MAIN | lv.STATE.DEFAULT)
button0.set_style_text_color(lv.color_hex(0xffffff), lv.PART.MAIN | lv.STATE.DEFAULT)
button0.set_style_text_opa(255, lv.PART.MAIN | lv.STATE.DEFAULT)
label0 = lv.label(button0)
label0.set_text("button0")
label0.set_align(lv.ALIGN.CENTER)
lv.screen_load(scr0)
scr0.set_style_bg_color(lv.color_hex(0x6600cc), lv.PART.MAIN | lv.STATE.DEFAULT)
scr0.set_style_bg_opa(51, lv.PART.MAIN | lv.STATE.DEFAULT)
Metadata
Metadata
Assignees
Labels
No labels