Fixed bug that was leading to a awkwardly big size of tooltip when it have multiple lines

This commit is contained in:
Xunto 2016-04-21 23:26:31 +03:00
parent c350cfb50b
commit 62b69d61da
1 changed files with 1 additions and 1 deletions

View File

@ -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;