Bug 1219177 - YaST Edit Printer dialogue misaligned UI element scaling
Summary: YaST Edit Printer dialogue misaligned UI element scaling
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Johannes Meixner
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-25 10:48 UTC by Philipp Reichmuth
Modified: 2024-01-25 13:05 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Edit Printer dialog with lots of whitespace between the listboxes. (452.34 KB, image/jpeg)
2024-01-25 10:48 UTC, Philipp Reichmuth
Details
Edit Printer dialog with a bit less whitespace between the listboxes, showing scaling behaviour. (234.56 KB, image/jpeg)
2024-01-25 10:49 UTC, Philipp Reichmuth
Details
Ncurses Edit Printer window with lots of whitespace (383.09 KB, image/jpeg)
2024-01-25 11:01 UTC, Philipp Reichmuth
Details
Screenshot showing the VStretch (628.73 KB, image/png)
2024-01-25 12:26 UTC, Stefan Hundhammer
Details
Screenshot showing the other VStretch (622.97 KB, image/png)
2024-01-25 12:27 UTC, Stefan Hundhammer
Details
Screenshot: Both non-stretchable (623.54 KB, image/png)
2024-01-25 12:29 UTC, Stefan Hundhammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Reichmuth 2024-01-25 10:48:05 UTC
Created attachment 872185 [details]
Edit Printer dialog with lots of whitespace between the listboxes.

The Edit Printer window (and related dialogues) in YaST exhibit strange resizing behaviour when the window is resized vertically. The upper and center list boxes resize with a percentage of the overall window, but the scale factors do not add to 100%. As a result, when you resize the window vertically, unused whitespace appears between the listboxes (see screenshots).

As a side effect, when you have different printed installed, the listbox with the list of drivers can get quite crowded, because it does not make use of the available space in the window.

How to reproduce:

1. Go to YaST (GUI version) → Printers, select a printer, click Edit
2. Resize the edit window vertically.

Observed behaviour:

The listboxes resize vertically, but less so than the window. Empty space appears between the listboxes and other UI elements. 

Expected behaviour:

The listboxes should resize to fill the available whitespace.
Comment 1 Philipp Reichmuth 2024-01-25 10:49:06 UTC
Created attachment 872186 [details]
Edit Printer dialog with a bit less whitespace between the listboxes, showing scaling behaviour.
Comment 2 Philipp Reichmuth 2024-01-25 11:01:35 UTC
Created attachment 872187 [details]
Ncurses Edit Printer window with lots of whitespace

The ncurses version has the same issue
Comment 3 Stefan Hundhammer 2024-01-25 12:18:17 UTC
This looks like the layout using stretchable VSpacings where they really should not be stretchable, but let the widgets with contents (like those tables) receive any extra space.
Comment 4 Stefan Hundhammer 2024-01-25 12:26:53 UTC
Created attachment 872190 [details]
Screenshot showing the VStretch

Using Ctrl-Shift-Alt-Y to open the YWidgetSpy, you can instpect the widget hierarchy and modify widget properties.

You can see here that it uses a VStretch placeholder which (as the name implies) is vertically stretchable, so it eats the extra space; it is distributed between the content widget (the table) and that VStretch, so each of them gets the same proportion of extra space if there is any.

Simply replace this VStretch with a VSpacing(1) or a VSpacing(2) to get some empty space, but not that much.
Comment 5 Stefan Hundhammer 2024-01-25 12:27:27 UTC
Created attachment 872191 [details]
Screenshot showing the other VStretch

And it's the same with the other VStretch.
Comment 6 Stefan Hundhammer 2024-01-25 12:29:47 UTC
Created attachment 872192 [details]
Screenshot: Both non-stretchable

Setting the vstrechable property of both to 'false' gets rid of that grey space, but now there is no border between the widgets which looks wrong.

Simply use a VSpacing(1) or VSpacing(2) instead. A VSpacing is not vertically stretchable by default.


This is explained in great detail at the libyui layout how-to documentation, but in this case just using VSpacing instead of VStretch will do the trick.
Comment 7 Stefan Hundhammer 2024-01-25 12:30:35 UTC
-> yast2-printer maintainer  Johannes Meixner
Comment 8 Stefan Hundhammer 2024-01-25 13:05:40 UTC
The YaST libyui layout how-to documentation:

https://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/bk08ch01.html#layout-howto