Duet Maestro & 12864 LCD button display glitches

Since the menu system in the reprap firmware is highly configurable, I tried to take advantage of it to design something for my Duet Maestro that goes beyond a standard Marlin "linear" menu structure to perform quickly some basic operations on the printer.

The menus use several buttons on one line. The menu works fine however I have several display glitches :
*Buttons appear and disappear when you move from one to the other (see the video below)
*When the printer change its "status" (printing/not printing/paused) the menu may not display the buttons that correspond to that status (through the button V argument)
*The last eight pixels of the horizontal line (which is an image) seems not being displayed (minor issue)

*Buttons appear and disappear when you move from one to the other (see the video below)

Fixed in my latest build.

*When the printer change its "status" (printing/not printing/paused) the menu may not display the buttons that correspond to that status (through the button V argument)

Believed fixed, subject to testing. Was there a particular sequence of operations that wasn't working?

*The last eight pixels of the horizontal line (which is an image) seems not being displayed (minor issue)

Fixed in my latest build.

The fixes will be in 2.02RC4 which is now postponed until at least Monday. Other changes I have made are that all types of menu item can now have conditional visibility (V parameter), and text and button items can have explicit widths (W parameter).

@dc42 This sounds great David, thanks a lot for looking at the issue so quickly. I believe issue 1 (button appear/disappear) and 2 (visibility vs printer status) are linked. I will anyway let you know if the issue is still there.

May you also evaluate increasing the size of the buffer for the menu if this has no negative impact on other things? With the current buffer size, a menu like the "grid" in my menu to move axis will create a buffer overflow if I put 6 buttons for all the 3 axis.

In any case the current system is already very powerful and your latest additions described in your post will make it even better

I've increased the size of the buffer. Also i corrected a bug whereby "menu" in the command was being replaced by the filename, when it should have been "#0" that was replaced. I've changed your "move" menu to the following:

@dc42 That's right, I forgot to mention about the #0 /menu issue, thanks for noticing that too! Thanks also for increasing buffer size, this will give even more freedom in menu creation.

Regarding menu button text alignment when a width is specified, both centered and right aligned would make sense for me. Centered would be perfect for text buttons (ex: buttons in top menu bar), right align for array of numbers (ex: temperatures, movements)

To avoid the addition of a new option, right aligned could be triggered by a negative width while centered is the default.

If just one option can be reasonably implemented, centered would have my preference. Personal opinion only for sure, others may have different views