Layout dietpi-config whiptail menu:
Dietpi v6.4:

Dietpi v6.5:

@k-plan
Due to roll out of G_WHIP in DietPi code. This automatically scales window based on screen dimensions against text lines and optional content: https://github.com/Fourdee/DietPi/issues/1546#issuecomment-370173876
Allows us to remove the hard defined whiptail scaling.
I'am rolling this out gradually in the code, when possible :)
@Fourdee
Allows us to remove the hard defined whiptail scaling.
- DietPi-Config
I'am rolling this out gradually in the code, when possible.
Ahh ... okay. Make sense. :+1:
A little side note:
Hardware : RPi Zero W ) as well, so it will look more like the old whiptail dialogue before.
Can we close this ticket?
@k-plan
it will looks not so puzzling, if you will centred the first line ( Hardware : RPi Zero W ) as well, so it will look more like the old whiptail dialogue before.
Can't centre the text in whiptail, we'd need to resize X based on max string length per line.
Would be nice to have implemented, leave ticket open for now, i'll see if I can get round to it.
If dialog size and text length is known, we could calculate how much space we need to add to beginning of header string to make it look aligned to centre.
Or set max dialog length based on header/text length.
@MichaIng
If dialog size and text length is known, we could calculate how much space we need to add to beginning of header string to make it look aligned to centre.
👍
My only concern (both methods) is the processing required to check each line of text for its length, and, all the menu/checklist entries (eg: dietpi-software 100+ ). I feel the tradeoff may overall slow the whiptail loading times.
@Fourdee
Yeah didn't see that the "header" in G_WHIP_MENU is message body, which can be of several lines of course. We would need to handle \n the as well... Might be better than to solve it by G_WHIP_SIZE_X_MAX in urgent cases then.
Might be better than to solve it by G_WHIP_SIZE_X_MAX in urgent cases then.
Agree. I've set a limit for all exit prompts.

I'll leave the remaining whiptail menus as automatic X max size for now. Yes, we could hard limit them all, however, should we send a commit that exceeds limits, adds additional checks that defeats the purpose of G_WHIP (to make whiptail + dev simple and effective)
Automatic X scaling based on input text contents is also a no go, due to the additional processing required to check each line of text.
I'll mark this as closed. X size of whiptail is based on the maximum available on screen, upto a set limit (140 i believe).