News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[r8682] Why is there space between entries in load/save window?

Started by THLeaderH, February 11, 2019, 02:36:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

Hello, everyone. Today I pulled changes of the simutrans svn repository and noticed the big changes that had been made in GUI related code.
In r8682 there are spaces between entries in load/save window like the attached image. Why are these spaces added? They seems to be meaningless for me, and IMO the spaces should be eliminated like previous versions. (Please see previous.png.)

I tried to remove these spaces by inserting the following code at gui/savegame_frame.cc:287 but it had no effect.

button_frame.set_margin(scr_size(0,0), scr_size(0,0));
button_frame.set_spacing(scr_size(0,0));

Is there any mean to fix this issue?

DrSuperGood

I am guessing that it is because the buttons themselves have a margin around them. I think the new UI is flow based meaning that the positions of actual elements are loosely defined and instead are based on the area requirements of the individual elements.

Dwachs

This is intended. If you want to change this locally, then change line 287 of savegamge_frame.cc to

button_frame.add_table(cols,0)->set_spacing(scr_size(0,0));

Parsley, sage, rosemary, and maggikraut.

THLeaderH

Thank you, it works. So for those who prefer older UI, what parameters should I set in the UI theme tab file?

prissi

Since usually there dialoges show many entires, I set it a vertical space of zero as the default. It can be configured in the theme with "gui_filelist_vspace" from revision r9047