diff options
author | Nikolas Nyby <nikolas@gnu.org> | 2019-01-28 21:54:32 -0500 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-01-29 07:18:48 +0000 |
commit | 6a56a4ce84165ad85d4e66944ef6691d94c9d0c3 (patch) | |
tree | f8d2c0ef128b18f6b36a2d002331e19c4ea3eb6e /src | |
parent | b22fbfbe3ddb1b965efdc948fe47cf9002cd3c71 (diff) | |
download | openttd-6a56a4ce84165ad85d4e66944ef6691d94c9d0c3.tar.xz |
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`.
Diffstat (limited to 'src')
-rw-r--r-- | src/engine_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 5e9e8cef7..51c7e1483 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -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); |