diff options
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 7a8340bfad..4c00c0cfe2 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -196,6 +196,27 @@ DragInfo::clear_copied_locations () copied_locations.clear (); } +#ifdef GTKOSX +static void +pane_size_watcher (Paned* pane) +{ + /* if the handle of a pane vanishes into (at least) the tabs of a notebook, + it is no longer accessible. so stop that. this doesn't happen on X11, + just the quartz backend. + + ugh. + */ + + int max_width_of_lhs = GTK_WIDGET(pane->gobj())->allocation.width - 25; + + gint pos = pane->get_position (); + + if (pos > max_width_of_lhs) { + pane->set_position (max_width_of_lhs); + } +} +#endif + Editor::Editor () : /* time display buttons */ @@ -722,6 +743,10 @@ Editor::Editor () edit_pane.pack2 (the_notebook, false, true); edit_pane.signal_size_allocate().connect (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast<Paned*> (&edit_pane))); +#ifdef GTKOSX + Glib::PropertyProxy<int> proxy = edit_pane.property_position(); + proxy.signal_changed().connect (bind (sigc::ptr_fun (pane_size_watcher), static_cast<Paned*> (&edit_pane))); +#endif top_hbox.pack_start (toolbar_frame, true, true); |