From 2205ce03b7311e828350754b0e67aa5283bb26d5 Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 21 May 2020 12:47:40 +0200 Subject: [PATCH] Fixed overlapping tooltips when showing markdown --- src/tooltips.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tooltips.cc b/src/tooltips.cc index 5bd47bc..1ad7951 100644 --- a/src/tooltips.cc +++ b/src/tooltips.cc @@ -196,6 +196,8 @@ void Tooltip::show(bool disregard_drawn, const std::function &on_motion) }); auto layout = Pango::Layout::create(tooltip_text_view->get_pango_context()); + if(auto tag = code_tag ? code_tag : code_block_tag) + layout->set_font_description(tag->property_font_desc()); layout->set_text(buffer->get_text()); layout->get_pixel_size(size.first, size.second); size.first += 6; // 2xpadding