Graphical Installer window clipping on "small" displays

  • Done
  • quality assurance status badge
Details
3 participants
  • Eric Bavier
  • Ludovic Courtès
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Eric Bavier
Severity
normal
E
E
Eric Bavier wrote on 4 Nov 2020 05:00
(address . bug-guix@gnu.org)
d5a782206384f4c3cb18d35524edc6fd7f708759.camel@posteo.net
Hello Guix,

When running the graphical installer on my Asus EeePC, many of the
windows get "clipped", i.e. content flows over the edge of the display.
Pictures are attached. Some critical text and a few of the action
buttons disappear.

I manage to get through the installation, but maybe only because I've
done this so many times and am familiar with the process :), but I fear
someone new to Guix might be less forgiving.

The native resolution of the display is 1024x600. In one of the ttys I
see:

root@gnu ~# printf "%dx%d\n" $COLUMNS $LINES
128x37

but the graphical installer window appears to display at about 102x31.

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.


`~Eric
Attachment: 2-welcome.jpg
Attachment: 3-keyboard.jpg
Attachment: 4-wifi.jpg
Attachment: 5-partition.jpg
M
M
Mathieu Othacehe wrote on 6 Nov 2020 15:23
(name . Eric Bavier)(address . bavier@posteo.net)(address . 44428@debbugs.gnu.org)
87wnyyk1hr.fsf@gnu.org
Hello Eric,

Toggle quote (6 lines)
> 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:

Toggle snippet (3 lines)
qemu-system-x86_64 -m 1024 -cdrom image.iso -display sdl -vga none -device virtio-vga,xres=800,yres=600

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.


* 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(-)

Toggle diff (78 lines)
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
E
E
Eric Bavier wrote on 7 Nov 2020 02:07
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 44428@debbugs.gnu.org)
470769b50add9f38242db38edfba831dbb82d936.camel@posteo.net
Hello Mathieu,

On Fri, 2020-11-06 at 15:23 +0100, Mathieu Othacehe wrote:
Toggle quote (7 lines)
> 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---
>

Excellent! I was hoping there was a way to test in qemu.

Toggle quote (8 lines)
> 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?

Yes, I still see the situation on the welcome and partitioning pages.
But I did not want to go past the partition step, because I have data
on this disk ;).

The other problematic pages look much better with your patch!

`~Eric
Attachment: 2-welcome.jpg
Attachment: 3-keyboard.jpg
Attachment: 4-wifi.jpg
Attachment: 5-partition.jpg
M
M
Mathieu Othacehe wrote on 7 Nov 2020 13:23
(name . Eric Bavier)(address . bavier@posteo.net)
87r1p5bbjh.fsf@gnu.org
Hey Eric,

Toggle quote (4 lines)
> Yes, I still see the situation on the welcome and partitioning pages.
> But I did not want to go past the partition step, because I have data
> on this disk ;).

Hehe, thanks for testing again :) I fixed a few more things, so that the
welcome logo is not displayed on small resolutions and the partitioning
and configuration pages do not overflow.

Pushed as 6dcbbcdab7727946cf32e7a4e44e66d151380db2.

On QEMU with 800x600 resolution there's no more box overflow. I hope
it will be the same on your hardware that seem to have a slightly higher
resolution.

Maybe we should take this one to the 1.2 branch. Ludo?

Thanks,

Mathieu
Closed
L
L
Ludovic Courtès wrote on 7 Nov 2020 22:37
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
87eel4x30c.fsf@gnu.org
Hi,

Mathieu Othacehe <othacehe@gnu.org> skribis:

Toggle quote (10 lines)
>> Yes, I still see the situation on the welcome and partitioning pages.
>> But I did not want to go past the partition step, because I have data
>> on this disk ;).
>
> Hehe, thanks for testing again :) I fixed a few more things, so that the
> welcome logo is not displayed on small resolutions and the partitioning
> and configuration pages do not overflow.
>
> Pushed as 6dcbbcdab7727946cf32e7a4e44e66d151380db2.

Awesome!

Toggle quote (4 lines)
> On QEMU with 800x600 resolution there's no more box overflow. I hope
> it will be the same on your hardware that seem to have a slightly higher
> resolution.

How do you tell QEMU to use that resolution?

Toggle quote (2 lines)
> Maybe we should take this one to the 1.2 branch. Ludo?

6dcbbcdab7727946cf32e7a4e44e66d151380db2 changes strings, so maybe we
should not take it.

8338d414b361e4fb961221642c1064e9dc89ba65 looks reasonable though, so I
think you can cherry-pick it in ‘version-1.2.0’.

Thank you!

Ludo’.
Closed
M
M
Mathieu Othacehe wrote on 8 Nov 2020 10:54
(name . Ludovic Courtès)(address . ludo@gnu.org)
87zh3sp41u.fsf@gnu.org
Hey Ludo,

Toggle quote (2 lines)
> How do you tell QEMU to use that resolution?

Toggle snippet (3 lines)
qemu-system-x86_64 -m 1024 -cdrom image.iso -display sdl -vga none -device virtio-vga,xres=800,yres=600

Toggle quote (3 lines)
> 8338d414b361e4fb961221642c1064e9dc89ba65 looks reasonable though, so I
> think you can cherry-pick it in ‘version-1.2.0’.

Done :)

Thanks,

Mathieu
Closed
E
E
Eric Bavier wrote on 9 Nov 2020 05:42
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
e4a8a1ed1ad21bb72aa806bf4b20c35bdfbc4fb6.camel@posteo.net
On Sat, 2020-11-07 at 13:23 +0100, Mathieu Othacehe wrote:
Toggle quote (2 lines)
> Pushed as 6dcbbcdab7727946cf32e7a4e44e66d151380db2.

Great! Thank you!

Toggle quote (4 lines)
> On QEMU with 800x600 resolution there's no more box overflow. I hope
> it will be the same on your hardware that seem to have a slightly higher
> resolution.

It seems that the qemu testing with restricted resolution is
sufficient.

`~Eric
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 44428@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 44428
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch