Mailinglist Archive: yast-devel (122 mails)

< Previous Next >
[yast-devel] Input field width in the mod-ui
  • From: Stefan Hundhammer <sh@xxxxxxx>
  • Date: Tue, 4 Dec 2007 11:58:45 +0100
  • Message-id: <200712041158.45975.sh@xxxxxxx>
This bug may be of general interest:

https://bugzilla.novell.com/show_bug.cgi?id=345819

In short, input fields (formerly known as TextEntry) and password fields now
no longer take all the space they can get, but by default use a reasonable
default width - unless you tell them to behave differently.

This was buggy in the old UI: They always stretched, even though though they
should not unless explicitly told (with `opt(`hstretch) ).

This bug is now fixed, but that OTOH means that it now behaves differently.
If we can live with adding some `opt(`hstretch) in some dialogs I would very
much prefer to keep the bug fix and add that `opt(`hstretch) where necessary
and/or useful.

With the fix we can have both ways: Input fields that use a reasonable width
by default and input fields that stretch to take whatever space is available.

Going back to the old version would mean we only have input fields that
stretch, and in cases where you don't want all the width to be consumed by an
input field use HWeight() or add some HSquash() or HVSquash() around the
VBox() to make it smaller, but of course always take care not to have them
become too small and add some MinWidth() - about like this:

`HSquash(
`MinWidth( 30, // min. 30 units wide (80x25 is main window size)
`VBox(
`InputField(`id(...), "blurb" ),
`InputField(`id(...), "blurb" ),
...
`InputField(`id(...), "blurb" )
)
)
)


So now the question is: Which kind of pain is bigger? Adding `opt(`hstretch)
or reverting to the old (IMHO buggy) behaviour?


CU
--
Stefan Hundhammer <sh@xxxxxxx> Penguin by conviction.
YaST2 Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Nürnberg, Germany
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups