Changeset - r23229:d5166f55387e
[Not reviewed]
master
0 1 0
Nikolas Nyby - 5 years ago 2019-01-29 02:54:32
nikolas@gnu.org
Fix #6584: text layout problem in engine preview dialog

With language set to German, there was a problem in this dialog box due
to the long strings in this language. It looks like the call to
`GetStringHeight()` here is using `r.top` to help calculate the
max width, rather than `r.left`.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/engine_gui.cpp
Show inline comments
 
@@ -108,7 +108,7 @@ struct EnginePreviewWindow : Window {
 

	
 
		EngineID engine = this->window_number;
 
		SetDParam(0, GetEngineCategoryName(engine));
 
		int y = r.top + GetStringHeight(STR_ENGINE_PREVIEW_MESSAGE, r.right - r.top + 1);
 
		int y = r.top + GetStringHeight(STR_ENGINE_PREVIEW_MESSAGE, r.right - r.left + 1);
 
		y = DrawStringMultiLine(r.left, r.right, r.top, y, STR_ENGINE_PREVIEW_MESSAGE, TC_FROMSTRING, SA_CENTER) + WD_PAR_VSEP_WIDE;
 

	
 
		SetDParam(0, engine);
0 comments (0 inline, 0 general)