CHintBox: fix possible unintended cut of text

Last line size was not considered.


Origin commit data
------------------
Commit: 87b53a8597
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-09-17 (Sun, 17 Sep 2017)
This commit is contained in:
2017-09-17 21:50:59 +02:00
parent 7d4e64e8f8
commit 6603d1126e

View File

@@ -268,7 +268,8 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
/* pre define required info height depends of lines and minimal needed height*/
int line_breaks = CTextBox::getLines(Text);
int h_font = item_font->getHeight();
int h_lines = h_font * line_breaks;
int h_lines = h_font;
h_lines += h_font * line_breaks;
/* get required height depends of possible lines and max height */
h_hint_obj = min(HINTBOX_MAX_HEIGHT - (ccw_head ? ccw_head->getHeight() : 0), h_lines + 2*w_indentation);