summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2014-10-18 16:11:40 +0000
committerpeter1138 <peter1138@openttd.org>2014-10-18 16:11:40 +0000
commit3730ed67cbe4108ca1ba7033de80935afbd724e2 (patch)
tree376c73b105041d42918a36c7f27ffff353d169c5
parentc794b8868117bd271d7d9c8ee1f27a05f00f8eec (diff)
downloadopenttd-3730ed67cbe4108ca1ba7033de80935afbd724e2.tar.xz
(svn r27023) -Codechange: Scale tooltip size by UI scale.
-rw-r--r--src/misc_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 2c85fae76..49e375d65 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -25,6 +25,7 @@
#include "querystring_gui.h"
#include "core/geometry_func.hpp"
#include "newgrf_debug.h"
+#include "zoom_func.h"
#include "widgets/misc_widget.h"
@@ -683,7 +684,7 @@ struct TooltipsWindow : public Window
/* There is only one widget. */
for (uint i = 0; i != this->paramcount; i++) SetDParam(i, this->params[i]);
- size->width = min(GetStringBoundingBox(this->string_id).width, 194);
+ size->width = min(GetStringBoundingBox(this->string_id).width, UnScaleByZoom(4 * 194, ZOOM_LVL_GUI));
size->height = GetStringHeight(this->string_id, size->width);
/* Increase slightly to have some space around the box. */