Ensure that Founding Father dialog is not too small #128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?