|
|
|
@ -196,11 +196,14 @@ void Tooltip::show(bool disregard_drawn, const std::function<void()> &on_motion) |
|
|
|
int min_x = rect.get_x(); |
|
|
|
int min_x = rect.get_x(); |
|
|
|
int max_x = rect.get_x() + rect.get_width(); |
|
|
|
int max_x = rect.get_x() + rect.get_width(); |
|
|
|
int height = 0; |
|
|
|
int height = 0; |
|
|
|
|
|
|
|
int max_height = 0; |
|
|
|
while(true) { |
|
|
|
while(true) { |
|
|
|
if(iter.ends_line()) { |
|
|
|
|
|
|
|
tooltip_text_view->get_iter_location(iter, rect); |
|
|
|
tooltip_text_view->get_iter_location(iter, rect); |
|
|
|
|
|
|
|
max_height = std::max(max_height, rect.get_height()); |
|
|
|
|
|
|
|
if(iter.ends_line()) { |
|
|
|
max_x = std::max(max_x, rect.get_x() + rect.get_width()); |
|
|
|
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()) |
|
|
|
if(iter.is_end()) |
|
|
|
break; |
|
|
|
break; |
|
|
|
|