13
0

Fix ArdourButton text-align when button size grows

This is mainly relevant when the button is placed inside a
Gtk::SizeGroup.
This commit is contained in:
Robin Gareus 2021-01-21 02:18:34 +01:00
parent cbd2cc7b2e
commit 959f83244e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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