bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44428: Graphical Installer window clipping on "small" displays


From: Mathieu Othacehe
Subject: bug#44428: Graphical Installer window clipping on "small" displays
Date: Fri, 06 Nov 2020 15:23:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hello Eric,

> I can understand if this is not a configuration that we need to
> "support", but was hoping that there might be something that could bedone to 
> help.
> These pictures were taken using the 1.1.0 release installer, but an
> installer I created for i686 at commit 8a7bbc35 seems to behave the
> same.

Thanks for the detailed bug report. Here's a patch improving the
situation. I tested it with:

--8<---------------cut here---------------start------------->8---
qemu-system-x86_64 -m 1024 -cdrom image.iso -display sdl -vga none -device 
virtio-vga,xres=800,yres=600
--8<---------------cut here---------------end--------------->8---

The problem is that three pages are still overflowing in 800x600:

* The welcome page.
* The partitioning page.
* The final configuration page.

Could you check if you share the same observations on your hardware?

Thanks,

Mathieu
>From 0e13414b5bbbb96cc6b8d83d2974cfea8ff8d073 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Fri, 6 Nov 2020 10:59:54 +0100
Subject: [PATCH] installer: Limit listbox height.

Partially fixes: <https://issues.guix.gnu.org/44428>.

* 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/ethernet.scm |  2 +-
 gnu/installer/newt/network.scm  |  2 +-
 gnu/installer/newt/page.scm     | 11 +++++++++--
 gnu/installer/newt/wifi.scm     |  3 ++-
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/gnu/installer/newt/ethernet.scm b/gnu/installer/newt/ethernet.scm
index ba5e222a37..ecd22efbb2 100644
--- a/gnu/installer/newt/ethernet.scm
+++ b/gnu/installer/newt/ethernet.scm
@@ -77,7 +77,7 @@ connection is pending."
       #:title (G_ "Ethernet connection")
       #:listbox-items services
       #:listbox-item->text ethernet-service->text
-      #:listbox-height (min (+ (length services) 2) 10)
+      #:listbox-height (min (+ (length services) 2) 5)
       #:button-text (G_ "Exit")
       #:button-callback-procedure
       (lambda _
diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm
index 461d5d99c0..4af7143d63 100644
--- a/gnu/installer/newt/network.scm
+++ b/gnu/installer/newt/network.scm
@@ -80,7 +80,7 @@ network devices were found. Do you want to continue anyway?"))
       #:title (G_ "Internet access")
       #:listbox-items items
       #:listbox-item->text technology->text
-      #:listbox-height (min (+ (length items) 2) 10)
+      #:listbox-height (min (+ (length items) 2) 5)
       #:button-text (G_ "Exit")
       #:button-callback-procedure
       (lambda _
diff --git a/gnu/installer/newt/page.scm b/gnu/installer/newt/page.scm
index 1d6b9979b4..4209674c28 100644
--- a/gnu/installer/newt/page.scm
+++ b/gnu/installer/newt/page.scm
@@ -32,7 +32,9 @@
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
   #:use-module (newt)
-  #:export (draw-info-page
+  #:export (default-listbox-height
+
+            draw-info-page
             draw-connecting-page
             run-input-page
             run-error-page
@@ -168,6 +170,10 @@ Like 'run-form', return two values: the exit reason, and 
an \"argument\"."
         (_
          (values reason argument))))))
 
+(define (default-listbox-height)
+  "Return the default listbox height."
+  (max 5 (- (screen-rows) 20)))
+
 (define (draw-info-page text title)
   "Draw an informative page with the given TEXT as content.  Set the title of
 this page to TITLE."
@@ -339,7 +345,8 @@ of the page is set to TITLE."
                                      (info-textbox-width 50)
                                      listbox-items
                                      listbox-item->text
-                                     (listbox-height 20)
+                                     (listbox-height
+                                      (default-listbox-height))
                                      (listbox-default-item #f)
                                      (listbox-allow-multiple? #f)
                                      (sort-listbox-items? #t)
diff --git a/gnu/installer/newt/wifi.scm b/gnu/installer/newt/wifi.scm
index 3fd5756b99..f5d8f1fdbf 100644
--- a/gnu/installer/newt/wifi.scm
+++ b/gnu/installer/newt/wifi.scm
@@ -165,7 +165,8 @@ of <service-item> records present in LISTBOX."
 (define service-name-max-length (make-parameter 20))
 
 ;; Height of the listbox displaying wifi services.
-(define wifi-listbox-height (make-parameter 20))
+(define wifi-listbox-height (make-parameter
+                             (default-listbox-height)))
 
 ;; Information textbox width.
 (define info-textbox-width (make-parameter 40))
-- 
2.29.2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]