From 99e31db66ed4be268eb2d9088a6997dee0ecc23e Mon Sep 17 00:00:00 2001 From: "Julien \"_FrnchFrgg_\" RIVAUD" Date: Sat, 20 Aug 2016 16:01:15 +0200 Subject: [PATCH] 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). --- gtk2_ardour/ardour_button.cc | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.30.2