summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-08-20 16:01:15 +0200
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-08-20 16:01:15 +0200
commit99e31db66ed4be268eb2d9088a6997dee0ecc23e (patch)
treea0bc53c171a03393fc915f4aa7d9159be5794a70 /gtk2_ardour
parentf108bf1373f8fdcf4c5a712756281ac265825b71 (diff)
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).
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_button.cc5
1 files changed, 5 insertions, 0 deletions
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<Gtk::Style>&)
{
_update_colors = true;
CairoWidget::set_dirty ();
+ _char_pixel_width = 0;
+ _char_pixel_height = 0;
+ if (is_realized()) {
+ queue_resize ();
+ }
}
void