Git Product home page Git Product logo

Comments (11)

kisvegabor avatar kisvegabor commented on May 29, 2024 2

I've discussed with @liamHowatt that he will work on it after the API retirement update.

from lvgl.

kisvegabor avatar kisvegabor commented on May 29, 2024

cc @XuNeo @bjsylvia

from lvgl.

lvgl-bot avatar lvgl-bot commented on May 29, 2024

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

from lvgl.

kisvegabor avatar kisvegabor commented on May 29, 2024

Not stale

from lvgl.

XuNeo avatar XuNeo commented on May 29, 2024

Hi Gabor,
This is an important feature, but is not currently under investigation from my side. Let's see if someone can jump in to take it.

from lvgl.

andyrea76 avatar andyrea76 commented on May 29, 2024

definitely not stale with the removal of recolor, see #6210

from lvgl.

kisvegabor avatar kisvegabor commented on May 29, 2024

From #6210:

but you have a lot more objects to create potentially dynamically as elements to highlight change

Note that the spans are not lv_objs. Just small structs with a little info in them. When text is parsed to create the spans we can allocate a multiple lv_spans at once, so it's only 1 extra malloc. I think in the end I believe the memory usage wont's be significantly larger especially for simple spans.

surely the old scheme of recolouring by the text parsing A: was already there and working for many people and B: could still exist in parallel to also not break something else in the not entirely trivial migration from 8.x up to 9

My intention was to have a single good way to add inline formatting. I felt like the recoloring-only adds a lot of complexity in exchange for a single not extensible feature.

I do agree that simple recoloring is quite common and there should be a boiler plate free way to handle it (i.e. without creating a new style for each color).

from lvgl.

andyrea76 avatar andyrea76 commented on May 29, 2024

IMHO it is hugely more difficult to emulate the old functionality

I make battery powered products so the more processing power and memory usage needed hurts

equally for that point, i have generic popup screens that i can just push a dynamic string of text into with the colouring all in place currently. the popup doesnt have to know or care how many coloured elements there are each time it is used, what colours they are and what style given changing fonts etc is not important, the colour is

the other application is a string of dynamic icons for status information, currently again symbol fonts in a string that may come and go and be in various colours depending on the current status of the device. essentially again all manipulateable with a simple char array string

whether it is right or wrong as the approach, doing less on a battery powered product is always a good thing

given the code was all there WRT colouring, can it not just be re-instated alongside the spans for those who do want a more featured experience where the platform allows

from lvgl.

andyrea76 avatar andyrea76 commented on May 29, 2024

is there no way to hide elements of the span? looking through lv_span.c it doesn't appear to be the case

from lvgl.

kisvegabor avatar kisvegabor commented on May 29, 2024

Converting a mark up-ed string to spans shouldn't take so long to really affect the battery. Especially if we consider that it's running rarely. (I.e. not every frame).

To make a compromise let's see how it works with the span and if it's really not good at the end we can consider adding back the old mechanism.

is there no way to hide elements of the span?

Really there is no such a feature now.

from lvgl.

andyrea76 avatar andyrea76 commented on May 29, 2024

the span code module having stepped / looked through it is fairly vast by comparison to what was removed to do the recolouring? the system i have inherited that was making use of that functionality works on the principle of creating all the screens and popups when it starts up and the showing the relevant screen , updating / hiding parts of screens if / as appropriate. meaning it only has the need for a generic popup alert screen that has its text updated before being displayed which is a fairly small part of the label code . with the span approach, i would have to destroy any previous span group objects, create the spans as they are almost certainly different to previous, add all the styles and text sections, then have the span module create all the labels and set the styles etc on all those. rather than do some simple string parsing and colouring when painting.

with the lack of visibility control i had to abandon the span entirely for the status icons and just revert to a flex row of labels in a container - basically doing it all by hand but at least i have control and can 'quickly' change the colour of each icon as necessary

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.