From: Julien "_FrnchFrgg_" RIVAUD Date: Sat, 20 Aug 2016 14:01:15 +0000 (+0200) Subject: Invalidate char_pixel_* on possible font change X-Git-Tag: 5.1~65 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=99e31db66ed4be268eb2d9088a6997dee0ecc23e Invalidate char_pixel_* on possible font change So that the padding and other elements always correctly depend on the font instead of the default GTK font (which might have a wildly different size from the fixed size fonts of Ardour's custom theme). --- diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index fbc6defdc1..df6311604a 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -965,6 +965,11 @@ ArdourButton::on_style_changed (const RefPtr&) { _update_colors = true; CairoWidget::set_dirty (); + _char_pixel_width = 0; + _char_pixel_height = 0; + if (is_realized()) { + queue_resize (); + } } void