Harmony v3: Odd Label behavior with a parent Image Plus Widget
I've been working on a project recently (reading and displaying bitmap images from USB to an attached 320x240 display) using a PIC32MZ2064DAG176 and Harmony v3. MPLAB X Version is 5.30 and XC32 is v2.30.
The main goal of reading an image into the internal DDR, converting it to an ImageAsset and placing it on the display via an Image widget works with no issues. I have a Text Widget as a child of the Image Widget to display the filename of the image when it is displayed. What I'm looking to do now is replace the Image widget with an Image Plus widget, as this will allow stretch and transform for images that are too large or small than the native res of the display.
After replacing Image Widget with an Image Plus Widget, it still "works", images still display, but transitioning between them is sometimes really messy (I uploaded a video here: https://drive.google.com/...YLi0W2fvjE66Ed_3kzD4KM
) This also seems to sometimes clobber my Label widget until the next image is displayed. I'm having trouble tracking the "why" of this behavior down.
I think it might be related to the showing/hiding of the Label widget. I did notice if I never show the text widget (visible == false), and remove all calls to laWidget_SetVisible() the problems seems to not occur, and the images switch cleanly. If I set the Label widget to always be shown, the problem seems to happen on the first transition between images, then seemingly never again.
I thought maybe that the optimization options for the Label widget in harmony might help (Local Redraw and Force Opaque) since they say they may help unnecessary redrawing of the parent, but enabling them did not seem to do anything.
My code for writing the image to the Image Plus widget is just a call to laImagePlusWidget_SetImage(). The label widget then gets updated with the new filename and resized to match the length of the string, and is shown by setting the Visible property of the label with a call to laWidget_SetVisible() after a short delay (not blocking). Increasing this delay does not seem to help the issue.
This all worked pretty cleanly with a standard Image widget, I'm just having a tough time figuring out what's different about the Image Plus widget that might be causing this issue? If anyone has thoughts, I'd love to hear them.