From 8338d414b361e4fb961221642c1064e9dc89ba65 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 6 Nov 2020 10:59:54 +0100 Subject: installer: Limit listbox height. Fixes: . * gnu/installer/newt.scm (init): Print screen size. * gnu/installer/newt/page.scm (default-listbox-height): New variable. (run-listbox-selection-page): Use it. * gnu/installer/newt/wifi.scm (wifi-listbox-height): Ditto. * gnu/installer/newt/network.scm (run-technology-page): Set the maximum listbox height to 5. * gnu/installer/newt/ethernet.scm (run-ethernet-page): Ditto. * gnu/installer/newt/final.scm (run-config-display-page): Change listbox height. * gnu/installer/newt/partition.scm (run-disk-page): Ditto. * gnu/installer/newt/welcome.scm (display-logo?): New procedure. (run-menu-page): Use it. * gnu/installer/steps.scm (%configuration-file-width): Remove it. --- gnu/installer/newt/welcome.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gnu/installer/newt/welcome.scm') diff --git a/gnu/installer/newt/welcome.scm b/gnu/installer/newt/welcome.scm index 1b4b2df816..5f461279e2 100644 --- a/gnu/installer/newt/welcome.scm +++ b/gnu/installer/newt/welcome.scm @@ -38,6 +38,9 @@ (define logo-height (make-parameter 19)) (define info-textbox-width (make-parameter 70)) (define options-listbox-height (make-parameter 5)) +(define (display-logo?) + (> (screen-rows) 35)) + (define* (run-menu-page title info-text logo #:key listbox-items @@ -55,7 +58,10 @@ (define (fill-listbox listbox items) items)) (let* ((logo-textbox - (make-textbox -1 -1 (logo-width) (logo-height) 0)) + (make-textbox -1 -1 + (if (display-logo?) (logo-width) 0) + (if (display-logo?) (logo-height) 0) + 0)) (info-textbox (make-reflowed-textbox -1 -1 info-text -- cgit v1.2.3