adjust the size of the disk script menus

This commit is contained in:
MacRimi 2025-04-08 18:18:39 +02:00
parent aed76879b1
commit 2e10aebb78
3 changed files with 5 additions and 5 deletions

View File

@ -245,8 +245,8 @@ msg_ok "$(translate "Available disks detected.")"
MAX_WIDTH=$(printf "%s\n" "${FREE_DISKS[@]}" | awk '{print length}' | sort -nr | head -n1) MAX_WIDTH=$(printf "%s\n" "${FREE_DISKS[@]}" | awk '{print length}' | sort -nr | head -n1)
TOTAL_WIDTH=$((MAX_WIDTH + 20)) TOTAL_WIDTH=$((MAX_WIDTH + 20))
if [ $TOTAL_WIDTH -lt 70 ]; then if [ $TOTAL_WIDTH -lt 50 ]; then
TOTAL_WIDTH=70 TOTAL_WIDTH=50
fi fi

View File

@ -288,8 +288,8 @@ msg_ok "$(translate "Available disks detected.")"
MAX_WIDTH=$(printf "%s\n" "${FREE_DISKS[@]}" | awk '{print length}' | sort -nr | head -n1) MAX_WIDTH=$(printf "%s\n" "${FREE_DISKS[@]}" | awk '{print length}' | sort -nr | head -n1)
TOTAL_WIDTH=$((MAX_WIDTH + 20)) TOTAL_WIDTH=$((MAX_WIDTH + 20))
if [ $TOTAL_WIDTH -lt 70 ]; then if [ $TOTAL_WIDTH -lt 50 ]; then
TOTAL_WIDTH=70 TOTAL_WIDTH=50
fi fi
SELECTED=$(whiptail --title "$(translate "Select Disks")" --radiolist \ SELECTED=$(whiptail --title "$(translate "Select Disks")" --radiolist \

View File

@ -591,7 +591,7 @@ function select_passthrough_disk() {
MAX_WIDTH=$(printf "%s\n" "${FREE_DISKS[@]}" | awk '{print length}' | sort -nr | head -n1) MAX_WIDTH=$(printf "%s\n" "${FREE_DISKS[@]}" | awk '{print length}' | sort -nr | head -n1)
TOTAL_WIDTH=$((MAX_WIDTH + 20)) TOTAL_WIDTH=$((MAX_WIDTH + 20))
[ $TOTAL_WIDTH -lt 70 ] && TOTAL_WIDTH=70 [ $TOTAL_WIDTH -lt 50 ] && TOTAL_WIDTH=50
cleanup cleanup
SELECTED_DISKS=$(whiptail --title "Select Disks" --checklist \ SELECTED_DISKS=$(whiptail --title "Select Disks" --checklist \
"$(translate "Select the disks you want to use (use spacebar to select):")" 20 $TOTAL_WIDTH 10 \ "$(translate "Select the disks you want to use (use spacebar to select):")" 20 $TOTAL_WIDTH 10 \