FreeCol / freecol

FreeCol: FreeCol is a turn-based strategy game based on the old game Colonization, and similar to Civilization. The objective of the game is to create an independent nation.
GNU General Public License v2.0
589 stars 173 forks source link

Ensure that Founding Father dialog is not too small #128

Open SJOS opened 1 year ago

SJOS commented 1 year ago

Ensure that Founding Father dialog is not too small, regardless of which language is used. This is a fix for https://sourceforge.net/p/freecol/bugs/3291/

The cause of the problem is that with the current layout, the width of the dialog is controlled by the width of the title headline ("Nominate founding father"). If using another language where the title contains fewer letters, the panel containing the description of each founding father becomes more narrow, since the text panels will state that they prefer a very narrow layout. In my experiments, it was the tabs above the panels that determined the size of the panel. And then the text instead is rendered with more rows, making the panel using much more vertical space than the dialog window allows for, making the "Ok" button end up outside of the visible window.

One could make the dialog allow for larger height of the dialog, or add vertical scroll bars if the panel is too high. But adding code that ensure that the dialog is never too narrow, makes the dialog look nicer, at least in the languages that I tried.

Not so found of adding a constant width number, but perhaps it is a good enough solution?