Monochrome theme: not receiving white pixels on pixel callback


I’ve been using littlevgl with a monochrome display so far, setting styles manually. I’ve been using lv_theme_mono_init to get a theme variable from which I copied styles, altered them and set them to objects. Now I realized that the idea is to use lv_theme_set_current after loading, so that all styles are applied to all objects types. The problem is that now that I added this call, on my pixel callback, I’m not receiving any calls with a white color, only black pixels. This has the effect of drawing over previous data without erasing the affected background to set it white again (for example, when I change a label text).
Now I’m wondering how does littlevgl deals with monochrome displays. Should I set something else (like setting the background color of elements to white)? It would seem as if the background of objects is now considered transparent and not cleared when changes.

What MCU/Processor/Board and compiler are you using?

I’m using STM32L4, over NuttX.

What do you want to achieve?

Drawing on monochrome display using mono theme.

What have you tried so far?

Setting the mono theme and not setting it. It works when not setting it.

Code to reproduce

Not sure which code is relevant, let me know and I’ll paste what you need.

Screenshot and/or video

Do you use v6 or v7? You can check it in lvgl.h.

I used v6 initially and after not being able to solve the problem decided to migrate to v7. The problem changed in v7 but I now managed to make it work. It seemed I had to consider the opa parameter to ignore pixel drawing request with transparent opacity. As I have transparency disabled I assumed no transparent pixels would ever be sent to the pixel callback. After this, it worked as expected.


I updated this behaviour in v7. Now fully transparent pixels are not sent to set_px_cb.