Giter VIP home page Giter VIP logo

Comments (7)

kisvegabor avatar kisvegabor commented on May 11, 2024

Hi,
it is a good idea, thank you!
Do you mean if the label's style is NULL (inherited from parent) use transparent background and use mcolor as background color if label's style is explicitly set? Maybe the empty style attribute can disable this feature.

from lvgl.

scopa90 avatar scopa90 commented on May 11, 2024

Or just keep it as transparent unless it's explcitly set?

from lvgl.

kisvegabor avatar kisvegabor commented on May 11, 2024

Currently there is no tracking for a unique style attribute (like mcolor) whether it is set or not. Only I can see the entire style is inherited or not.

from lvgl.

kisvegabor avatar kisvegabor commented on May 11, 2024

If we think it further the label can use all backround related style attributes like mcolor, gcolor, bcolor, bopa etc. but only if its style is set explicitly. Else only use the inherited font, ccolor, letter space etc

What do you think?

from lvgl.

kisvegabor avatar kisvegabor commented on May 11, 2024

I added the update to beta. Now if a label's style is set by lv_obj_set_style() to not NULL then background will be drawn.
To avoid drawing background set empty=1 and bwidth=0 properties or copy LV_STYLE_TRANSP when initializing a new label style.

Tests are still needed to see how it effect existing objects where labels are used.

from lvgl.

scopa90 avatar scopa90 commented on May 11, 2024

Just had chance to test this but only for a straight label. Looks very good.

from lvgl.

kisvegabor avatar kisvegabor commented on May 11, 2024

Thanks for testing!

from lvgl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.