From ae83d8121d3ebc9e4b46c4925c27a76132cb8425 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 17 Oct 2021 17:58:34 -0600 Subject: [PATCH] triggerbox UI: size_allocate() for trigger name text --- gtk2_ardour/triggerbox_ui.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/triggerbox_ui.cc b/gtk2_ardour/triggerbox_ui.cc index 1edcb08292..1eab1d32e3 100644 --- a/gtk2_ardour/triggerbox_ui.cc +++ b/gtk2_ardour/triggerbox_ui.cc @@ -200,7 +200,11 @@ TriggerEntry::_size_allocate (ArdourCanvas::Rect const & alloc) shape_play_button (); play_button->set (ArdourCanvas::Rect (poly_margin/2., poly_margin/2., poly_size + ((poly_margin/2.) * 2.), height - ((poly_margin/2.) * 2.))); - name_text->set_position (Duple (play_button->get().width() + (2. * scale), poly_margin)); + const Distance lhs = play_button->get().width() + (2. * poly_margin * scale); + ArdourCanvas::Rect text_alloc (lhs, poly_margin, alloc.width() - lhs - (poly_margin * scale), alloc.height() - (2. * poly_margin)); + name_text->size_allocate (text_alloc); + + name_text->set_position (Duple (lhs, poly_margin)); } void