diff --git a/src/tooltips.cpp b/src/tooltips.cpp index bfbe4e9..450d6da 100644 --- a/src/tooltips.cpp +++ b/src/tooltips.cpp @@ -196,11 +196,14 @@ void Tooltip::show(bool disregard_drawn, const std::function &on_motion) int min_x = rect.get_x(); int max_x = rect.get_x() + rect.get_width(); int height = 0; + int max_height = 0; while(true) { + tooltip_text_view->get_iter_location(iter, rect); + max_height = std::max(max_height, rect.get_height()); if(iter.ends_line()) { - tooltip_text_view->get_iter_location(iter, rect); max_x = std::max(max_x, rect.get_x() + rect.get_width()); - height += rect.get_height(); + height += max_height; + max_height = 0; } if(iter.is_end()) break;