summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-05-04 12:26:32 +0000
committerCarl Hetherington <carl@carlh.net>2011-05-04 12:26:32 +0000
commit378ea3430ff5cb8131ebbd93c8126ba6c46416f0 (patch)
tree5513fefc4118ef1a26c01951b76d05ad240329d0 /gtk2_ardour/time_axis_view.cc
parentbcb554a1909b24182a881b9a0506c8467dc36687 (diff)
Don't alter horizontal padding when shrinking tracks to their minimum height (part of #4014).
git-svn-id: svn://localhost/ardour2/branches/3.0@9472 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r--gtk2_ardour/time_axis_view.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 380b4b4c56..8f47c7745e 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -75,6 +75,7 @@ PBD::Signal1<void,TimeAxisView*> TimeAxisView::CatchDeletion;
TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
: AxisView (sess)
, controls_table (2, 8)
+ , _controls_padding_table (3, 3)
, _size_menu (0)
, _y_position (0)
, _editor (ed)
@@ -134,7 +135,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
name_hbox.show ();
controls_table.set_size_request (200);
- controls_table.set_border_width (2);
controls_table.set_row_spacings (0);
controls_table.set_col_spacings (0);
controls_table.set_homogeneous (true);
@@ -161,7 +161,15 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
HSeparator* separator = manage (new HSeparator());
- controls_vbox.pack_start (controls_table, false, false);
+ /* Use a rather hacky extra table so that we can control the space above/below and
+ * left/right of the controls_table separately. This in turn is so that we can
+ * shrink the vertical space when the track is at its minimum height.
+ */
+ _controls_padding_table.set_row_spacings (2);
+ _controls_padding_table.set_col_spacings (0);
+ _controls_padding_table.attach (controls_table, 1, 2, 1, 2);
+
+ controls_vbox.pack_start (_controls_padding_table, false, false);
controls_vbox.pack_end (resizer_box, false, false);
controls_vbox.show ();