use pack options in trigger box UI

This commit is contained in:
Paul Davis 2021-07-29 12:24:04 -06:00
parent 9698de0212
commit 08150c1547
2 changed files with 6 additions and 4 deletions

View File

@ -36,8 +36,8 @@ using namespace ArdourCanvas;
using namespace Gtkmm2ext;
using namespace PBD;
TriggerEntry::TriggerEntry (Item* parent, ARDOUR::Trigger& t)
: Rectangle (parent)
TriggerEntry::TriggerEntry (Canvas* canvas, ARDOUR::Trigger& t)
: Rectangle (canvas)
, _trigger (t)
{
const double scale = UIConfiguration::instance().get_ui_scale();
@ -110,7 +110,9 @@ TriggerBoxUI::build ()
break;
}
std::cerr << "NEW TE for trigger " << n << std::endl;
TriggerEntry* te = new TriggerEntry (this, *t);
TriggerEntry* te = new TriggerEntry (canvas(), *t);
te->set_pack_options (PackOptions (PackFill|PackExpand));
add (te);
_slots.push_back (te);

View File

@ -40,7 +40,7 @@ namespace ArdourCanvas {
class TriggerEntry : public ArdourCanvas::Rectangle
{
public:
TriggerEntry (ArdourCanvas::Item* parent, ARDOUR::Trigger&);
TriggerEntry (ArdourCanvas::Canvas* canvas, ARDOUR::Trigger&);
~TriggerEntry ();
ARDOUR::Trigger& trigger() const { return _trigger; }