DietPi-Config | Testing - v6.5 Layout

Created on 18 Mar 2018  ·  8Comments  ·  Source: MichaIng/DietPi

Layout dietpi-config whiptail menu:

Dietpi v6.4:

180318-0009

Dietpi v6.5:

180318-0008

Priority Low Question

All 8 comments

@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.

Completed:

  • 🈯️ DietPi-Software
  • 🈯️ DietPi-Cron

Started

  • DietPi-Config

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:

  • 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.

2018-03-19 17-43-53

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.
image

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).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mok-liee picture mok-liee  ·  3Comments

Kapot picture Kapot  ·  3Comments

bhaveshgohel picture bhaveshgohel  ·  3Comments

oshank picture oshank  ·  3Comments

MichaIng picture MichaIng  ·  3Comments