From d280c46d444cb20be2ec92c46a75d93b61a7de55 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 28 Jan 2025 07:13:12 +0100 Subject: [PATCH] Add API to add sizing-texts to ArdourButton --- libs/widgets/ardour_button.cc | 7 +++++++ libs/widgets/widgets/ardour_button.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index 73a11d9725..663344aed4 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -238,6 +238,13 @@ ArdourButton::set_sizing_text (std::string const& str) queue_resize (); } +void +ArdourButton::add_sizing_text (std::string const& str) +{ + _sizing_texts.push_back (str); + queue_resize (); +} + void ArdourButton::set_sizing_texts (std::vector const& s) { diff --git a/libs/widgets/widgets/ardour_button.h b/libs/widgets/widgets/ardour_button.h index 7b39f6c5bf..250e4b305b 100644 --- a/libs/widgets/widgets/ardour_button.h +++ b/libs/widgets/widgets/ardour_button.h @@ -113,6 +113,7 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ * empty string to return to the default behavior which uses * the currently displayed text for measurement. */ void set_sizing_text (std::string const&); + void add_sizing_text (std::string const&); void set_sizing_texts (std::vector const&); sigc::signal signal_led_clicked;