The International Simutrans Forum

 

Author Topic: Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t  (Read 556 times)

0 Members and 1 Guest are viewing this topic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t
« on: October 14, 2019, 11:49:06 AM »
Only the depot opens in the requested setting. Only depots and grounddialogue are opening in the requested width. Investifating.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Re: Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t
« Reply #1 on: October 17, 2019, 06:09:22 PM »
I did not know there is a default at all :( Dialogue windows will remember their sizes when opened once. Their sizes are saved in the settings.xml file (rdwr_win_settings)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t
« Reply #2 on: October 17, 2019, 11:52:25 PM »
The original idea was that the dialogues have all the same inital width (D_DEFAULT_WIDTH). That way they could be tiled in rows. Currently only the depots do this. Any windows with a world view will have a rather random width.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Re: Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t
« Reply #3 on: October 18, 2019, 08:45:12 PM »
Tried to fix this with r8849: when opening it tries to enlarge windows to the default width/height.

I still have to work on the save/load of window sizes. Size is saved by magic numbers in a hashtable, but gives problems for window types that use pointers as magic numbers.