GenericUI: better popup placement for automation mode
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Mon, 8 Aug 2016 14:33:29 +0000 (16:33 +0200)
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Mon, 8 Aug 2016 14:44:40 +0000 (16:44 +0200)
gtk2_ardour/generic_pluginui.cc

index 8ccce2e75196c1500552efbe2c85b6204549423f..7832dcfbfeb18205cf53fbf0fc795734e62e03e9 100644 (file)
@@ -940,6 +940,7 @@ GenericPluginUI::astate_clicked (ControlUI* cui)
        if (automation_menu == 0) {
                automation_menu = manage (new Menu);
                automation_menu->set_name ("ArdourContextMenu");
+               automation_menu->set_reserve_toggle_size(false);
        }
 
        MenuList& items (automation_menu->items());
@@ -954,7 +955,9 @@ GenericPluginUI::astate_clicked (ControlUI* cui)
        items.push_back (MenuElem (_("Touch"),
                                   sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Touch, cui)));
 
-       automation_menu->popup (1, gtk_get_current_event_time());
+       automation_menu->popup (
+               boost::bind (&Gtkmm2ext::position_menu_anchored, automation_menu, &cui->automate_button, "", _1, _2, _3),
+               1, gtk_get_current_event_time());
 }
 
 void