The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: THLeaderH on February 11, 2019, 02:36:49 PM

Title: [r8682] Why is there space between entries in load/save window?
Post by: THLeaderH on February 11, 2019, 02:36:49 PM
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?
Title: Re: [r8682] Why is there space between entries in load/save window?
Post by: DrSuperGood on February 11, 2019, 02:44:38 PM
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.
Title: Re: [r8682] Why is there space between entries in load/save window?
Post by: Dwachs on February 11, 2019, 05:57:00 PM
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));

Title: Re: [r8682] Why is there space between entries in load/save window?
Post by: THLeaderH on February 17, 2019, 02:31:36 AM
Thank you, it works. So for those who prefer older UI, what parameters should I set in the UI theme tab file?
Title: Re: [r8682] Why is there space between entries in load/save window?
Post by: prissi on April 24, 2020, 02:15:33 PM
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