From 959f83244efff6aea7a4acf7cf1be99b4d1fbfdb Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 21 Jan 2021 02:18:34 +0100 Subject: [PATCH] Fix ArdourButton text-align when button size grows This is mainly relevant when the button is placed inside a Gtk::SizeGroup. --- libs/widgets/ardour_button.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index a0000e4dc6..110bb2fea6 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -972,6 +972,10 @@ ArdourButton::on_size_allocate (Allocation& alloc) { CairoWidget::on_size_allocate (alloc); setup_led_rect (); + if (_layout) { + /* re-center text */ + _layout->get_pixel_size (_text_width, _text_height); + } } void