lower min-width to 25 columns

Some screen size are quite small. For example, the default phosh
terminal is less than 50 character wide on Pinephone. This lowers the minimum
loading bar size to 25 characters.

For comparison, 25 character wide is just as wide as "apk add firefox
linux-lts" without the quotes.

Here's a bad picture to illustrate the result
gitlab.alpine.org/uploads/48c20f746fbf685b62b6bd73585ecbf2/pinephone-phosh.png
cute-signatures
Antoine Fontaine 2020-03-21 12:09:28 +01:00 committed by Timo Teräs
parent a9916c2d4a
commit e8522411c1
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ int apk_get_screen_width(void)
if (apk_screen_width == 0) {
apk_screen_width = 50;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) == 0 &&
w.ws_col > 50)
w.ws_col > 25)
apk_screen_width = w.ws_col;
}