Comments (11)
I've discussed with @liamHowatt that he will work on it after the API retirement update.
from lvgl.
from lvgl.
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.
Not stale
from lvgl.
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.
definitely not stale with the removal of recolor, see #6210
from lvgl.
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_obj
s. Just small struct
s with a little info in them. When text is parsed to create the spans we can allocate a multiple lv_span
s 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.
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.
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.
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.
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)
- Error: failed to map framebuffer device to memory: Invalid argument HOT 1
- LV_EVENT_CLICKED should only be fired if the release takes place over the same object where the press happened HOT 3
- Default fonts not clear on red background HOT 4
- Span elements not printing properly HOT 5
- Display bug HOT 2
- get_x_aligned returns wrong value in case of percentage unit HOT 6
- STM32 Baremetal application only Renders to part of the screen HOT 5
- Change TileView Scroll animation speed HOT 3
- why the picture pixel blinking when running lvgl demo HOT 1
- Number and logic buttons in physical buttons
- Bengali string display abnormal using freetype lib HOT 2
- Cannot play custom gif in v9.1 HOT 6
- lvgl draws artefacts after button click HOT 3
- Could provide a font convert tool by c++? HOT 1
- Failing docs build HOT 10
- Grid layout style `grid_column_align` seems to have no effect HOT 5
- Linux DRM display mode locks up by default due to missing lv_tick_set_cb
- discussion about C++ code in LVGL HOT 4
- lv_api_map_v8.h has no consideration for things that are enabled/disabled
- Buggy Demos in 9.x
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvgl.