From: Xunto Date: Thu, 21 Apr 2016 20:26:31 +0000 (+0300) Subject: Fix bug that was leading to oversized tooltips containing multiline text when it... X-Git-Tag: 0.4.14~85 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=21079cc8ebae0bf694c1903c07bf3e1517feab99;p=oweals%2Fminetest.git Fix bug that was leading to oversized tooltips containing multiline text when it have multiple lines --- diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 6492eb9d9..1a6ee91cd 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -2253,7 +2253,7 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase, this->bringToFront(m_tooltip_element); m_tooltip_element->setText(utf8_to_wide(tooltip_text).c_str()); s32 tooltip_width = m_tooltip_element->getTextWidth() + m_btn_height; - s32 tooltip_height = m_tooltip_element->getTextHeight() * tt_rows.size() + 5; + s32 tooltip_height = m_tooltip_element->getTextHeight() + 5; v2u32 screenSize = driver->getScreenSize(); int tooltip_offset_x = m_btn_height; int tooltip_offset_y = m_btn_height;