From 23dc9e0193d3b0f4abf0844878599f2de1ed5a8d Mon Sep 17 00:00:00 2001 From: Antoine Fontaine Date: Sat, 21 Mar 2020 12:09:28 +0100 Subject: 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 (cherry picked from commit e8522411c1b410c87049e9b77b391caf2f158be7) --- src/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/print.c b/src/print.c index b2bbca4..b8f622f 100644 --- a/src/print.c +++ b/src/print.c @@ -39,7 +39,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; } -- cgit v1.2.3-70-g09d2