summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-06-22 16:48:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-06-22 16:48:56 +0000
commit3287d5534d9345197f9b3718bd9ab404403675ba (patch)
treea195ec6edf24a7d3866418486d8496e23865972a /gtk2_ardour/editor.cc
parent46d785e720d1f2b8b2c88648b8ab1d4293d42916 (diff)
use the pane watcher to prevent the nastiness that occurs when the RHS editor list is dragged so that the pane handle "vanishes" into the tabs. this used to only be a problem on OS X, but a variation of the problem is there on X11 too (fixes #4410)
git-svn-id: svn://localhost/ardour2/branches/3.0@12821 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 44548791ea..a08b9f8e5f 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -214,18 +214,22 @@ show_me_the_size (Requisition* r, const char* what)
cerr << "size of " << what << " = " << r->width << " x " << r->height << endl;
}
-#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.
+ it is:
+
+ X: hard to access
+ Quartz: impossible to access
+
+ so stop that by preventing it from ever getting too narrow. 35
+ pixels is basically a rough guess at the tab width.
ugh.
*/
- int max_width_of_lhs = GTK_WIDGET(pane->gobj())->allocation.width - 25;
+ int max_width_of_lhs = GTK_WIDGET(pane->gobj())->allocation.width - 35;
gint pos = pane->get_position ();
@@ -233,7 +237,6 @@ pane_size_watcher (Paned* pane)
pane->set_position (max_width_of_lhs);
}
}
-#endif
Editor::Editor ()
: _join_object_range_state (JOIN_OBJECT_RANGE_NONE)
@@ -602,13 +605,13 @@ Editor::Editor ()
editor_summary_pane.signal_size_allocate().connect (sigc::bind (sigc::mem_fun (*this, &Editor::pane_allocation_handler), static_cast<Paned*> (&editor_summary_pane)));
- /* XXX: editor_summary_pane might need similar special OS X treatment to the edit_pane */
+ /* XXX: editor_summary_pane might need similar to the edit_pane */
edit_pane.signal_size_allocate().connect (sigc::bind (sigc::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);
HBox *hbox = manage (new HBox);