Skip to content

Setting transparency for a component results in a dirty image #394

Description

@lbuque

Image

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions