diff --git a/gtk2_ardour/ardour_dropdown.cc b/gtk2_ardour/ardour_dropdown.cc index ec63c8262e..c991087f25 100644 --- a/gtk2_ardour/ardour_dropdown.cc +++ b/gtk2_ardour/ardour_dropdown.cc @@ -50,6 +50,7 @@ ArdourDropdown::ArdourDropdown (Element e) : _scrolling_disabled(false) { // signal_button_press_event().connect (sigc::mem_fun(*this, &ArdourDropdown::on_mouse_pressed)); + _menu.signal_size_request().connect (sigc::mem_fun(*this, &ArdourDropdown::menu_size_request)); add_elements(e); add_elements(ArdourButton::Menu); @@ -59,6 +60,11 @@ ArdourDropdown::~ArdourDropdown () { } +void +ArdourDropdown::menu_size_request(Requisition *req) { + req->width = max(req->width, get_allocation().get_width()); +} + void ArdourDropdown::position_menu(int& x, int& y, bool& push_in) { using namespace Menu_Helpers; diff --git a/gtk2_ardour/ardour_dropdown.h b/gtk2_ardour/ardour_dropdown.h index 9b79f10b0e..5a710ec539 100644 --- a/gtk2_ardour/ardour_dropdown.h +++ b/gtk2_ardour/ardour_dropdown.h @@ -39,6 +39,7 @@ class ArdourDropdown : public ArdourButton bool on_button_press_event (GdkEventButton*); bool on_scroll_event (GdkEventScroll*); void position_menu(int&, int&, bool&); + void menu_size_request(Gtk::Requisition*); void clear_items (); void AddMenuElem (Gtk::Menu_Helpers::Element e);