From 00f604019d6888f41f6d37e0a8cb99c39758a4f0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Oct 2014 17:25:50 -0400 Subject: [PATCH] add ::set_layout_font (const Pango::FontDescription&) to ArdourButton --- gtk2_ardour/ardour_button.cc | 10 ++++++++++ gtk2_ardour/ardour_button.h | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index f3f7789f46..447fc1ef0c 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -150,6 +150,16 @@ ArdourButton::~ArdourButton() } } +void +ArdourButton::set_layout_font (const Pango::FontDescription& fd) +{ + ensure_layout (); + if (_layout) { + _layout->set_font_description (fd); + queue_resize (); + } +} + void ArdourButton::set_text (const std::string& str) { diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h index 9d59f1a9ea..7d837e70cd 100644 --- a/gtk2_ardour/ardour_button.h +++ b/gtk2_ardour/ardour_button.h @@ -83,8 +83,9 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable void set_distinct_led_click (bool yn); void set_layout_ellisize_width (int w); + void set_layout_font (const Pango::FontDescription&); void set_text_ellipsize (Pango::EllipsizeMode); - + sigc::signal signal_led_clicked; sigc::signal signal_clicked;