Qui, 2007-06-21 às 10:21 +0200, Lukas Ocilka escreveu:
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.
Relative sizing is no better than relative positioning; where you set a window size, and everything on absolute coordinates and then the layout engine will apply the proper transformation as the user resizes the window (used to give dynamic layout for old generation absolute layout engines). In modern layouts, you set the central widget(s) as stretchable, and the auxiliaries as not. Otherwise you ruin user expectation and aesthetics. In the users.ycp case they are even being used to pass the work of proper layouting to the user, forcing him to enlarge the window if he uses a font size bigger than yours. A fix for this could be to allow YCP writters to set the size policy of the MultiSelectionBox, so that it doesn't shrink or enlarge horizontally.
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.
That's the default yast-gtk size. heh. Our default size is smaller than yast-qt (we enlarge the window if necessary). In any case, I have made a work-around for this; scrollable widgets minimum size should be its child size or 120 pixels, whatever is lower. Cheers, Ricardo
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.
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org