summary refs log tree commit diff
path: root/gnu/installer/newt/welcome.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-11-06 10:59:54 +0100
committerMathieu Othacehe <othacehe@gnu.org>2020-11-07 13:19:25 +0100
commit8338d414b361e4fb961221642c1064e9dc89ba65 (patch)
treef1ac1d12c647617446d00a50ce2afed70a5c9dc1 /gnu/installer/newt/welcome.scm
parent07239f39db9bce48b938afe210ab20d87f431791 (diff)
downloadguix-8338d414b361e4fb961221642c1064e9dc89ba65.tar.gz
installer: Limit listbox height.
Fixes: <https://issues.guix.gnu.org/44428>.

* 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.
Diffstat (limited to 'gnu/installer/newt/welcome.scm')
-rw-r--r--gnu/installer/newt/welcome.scm8
1 files changed, 7 insertions, 1 deletions
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 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 @@ we want this page to occupy all the screen space available."
          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