Ricardo Cruz wrote:
Ter, 2007-06-19 às 15:49 +0200, Lukas Ocilka escreveu:
Hi,
When YaST developer or designer are designing the YaST dialogs, they need to define some relative sizes between widgets. Unfortunately, the worst cases cannot be expected and we usually ignore them.
This splitter idea would be useful, and the example you gave is a good one. However, I don't see how that relates to relative sizing, and I object to that. YCP writers abuse the weight property too much, and it results in dialogs where you need to stretch the window to see some widget; and past a certain point, it ruins aesthetics. In a way, you are outsourcing that work to the user.
Relative size is used for the initial sizes presented on the screen. When designing a dialog, you'll probably want to define how it should initially look like. Then, splitter could be used to change that layout if needed. The default layout should be designed to be enough good for most of cases.
Users.ycp features such an abuse: http://www.alunos.dcc.fc.up.pt/~c0607045/trash/yast/users-small.png
Here, you could use the relative size: Groups: 1/3 width of the screen, the other widgets in another HBox occupying 2/3 of the screen. I'm afraid that this dialog was not designed nor tested for so small screen, that's all.
http://www.alunos.dcc.fc.up.pt/~c0607045/trash/yast/users-big.png
The containers that GTK+ ships with don't feature weights and you can actually layout things better. Lists and other widgets, when used like in the shots, should be set as not stretchable, and shown at their full size (if they are not too big; otherwise, truncate their requested size and let them expand till its maximum size).
Where the weight may make sense is, for instance, if you had a few tables at the center, with different number of columns...
What do you think?
Text-entries are stretchable by default. All those widgets are stretchable probably to be aligned with each other. If it is a bug and doesn't work well even in Qt or Ncurses, it's worth a bugreport. L.