What MCU/Processor/Board and compiler are you using?
STM32F7
What LVGL version are you using?
v7.7
What do you want to achieve?
When poping a msgbox , make all the background obj unclickable and add some black opa . When press the btn on msgbox, quit msgbox and recover all the background.
What have you tried so far?
lv_obj_set_click(lv_disp_get_layer_top(NULL), true ); and create the msgbox on it . right?
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
I am running with msgbox and want to make the other obj on the screen unclickable, except the msgbox btn. Set lv_obj_set_click(lv_disp_get_layer_top(NULL), true ); and create the msgbox on it . right?
I got know the different between lv_obj_set_style_local_bg_color and lv_style_set_bg_color, but when should I use the former?
Is there any tool to monitor the runtime memory allocation? How is the memory cost and the speed in v7.7 compared to the v6.0?
The former is better to use when overriding style properties for one object. If you plan to override the same style property on many objects, use the latter.
You can use lv_mem_monitor like the PC simulator does. I am not sure of the exact statistics on memory consumption. v7βs performance has regressed slightly compared to v6, however the difference can be worked around as long as you have sufficient RAM available. v8 is expected to bring performance improvements.
You means there have another easy way to make the background of the msgbox unclickable? Could you give me some advice on detail ?
Can I adjust some letter space in a label? For example, the label β123.456.789β , I would fix the letter width and let the β.β to take the narrow space. How to implement? Could you give me some advice.
In the default font,the letter width is a varible , so I set it to a fix width. Thus the β.β will take a wider space than in the font lib. You means to create new font insdead of the default ? I will try.
By monitor the mem, I found the used_cnt and max_used is continuous increasing and the refresh cycle will become slower and slower. The code is updated from v6.0 and work fine in that case. There have create a chart and some btn with label on it in the initial and just update the chart series and some other label in the main loop. How to detect the bug? Would like to have your advice!
Hi, embeddedt,
Many Thanks!
Had just tried the v7.90 dev master branch, the same mem issue occured. The used_cnt and max_used are growing from the 0x5BA and 0x10240 at the beginning to 0x3CD2 and 0x39A74 after running for 20 mins.
Could you give me some advice on the detail for debug?
The first is to try cutting out parts of your program, not updating certain widgets, etc. until you find what is causing the problem. It looks like either you are or LVGL is allocating memory and not freeing it.
The other option is to attach a debugger while the program is running and find what is calling lv_mem_alloc. You may trace it to a point where there is no corresponding call to lv_mem_free.
Found out the issue,that I had used lv_style_set_line_color in my design func , which call the mem allocation.
BTW, why we just left one default theme in the v7.9 and more than one in the v6.0?