The International Simutrans Forum

 

Author Topic: [r8682] Why is there space between entries in load/save window?  (Read 209 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 275
  • Languages: JP,EN
[r8682] Why is there space between entries in load/save window?
« 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.
Code: [Select]
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?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2558
  • Languages: EN
Re: [r8682] Why is there space between entries in load/save window?
« Reply #1 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4533
  • Languages: EN, DE, AT
Re: [r8682] Why is there space between entries in load/save window?
« Reply #2 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
Code: [Select]
button_frame.add_table(cols,0)->set_spacing(scr_size(0,0));

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 275
  • Languages: JP,EN
Re: [r8682] Why is there space between entries in load/save window?
« Reply #3 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?