The International Simutrans Forum

Development => Bug Reports => Known bugs and features => Topic started by: prissi on October 14, 2019, 11:49:06 AM

Title: Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t
Post by: prissi 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.
Title: Re: Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t
Post by: Dwachs 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)
Title: Re: Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t
Post by: prissi 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.
Title: Re: Dialog windows ignore DEFAULT_WIDTH setting from gui_theme_t
Post by: Dwachs 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.