diff options
author | Robin Gareus <robin@gareus.org> | 2014-08-31 07:11:24 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-08-31 07:11:24 +0200 |
commit | 9c59b21bb67906e4619b27ee3a87e9b27f8ec55c (patch) | |
tree | a4fbe3c08be8c4fa5a8adca99d78906e9442e9be /gtk2_ardour/automation_time_axis.cc | |
parent | 36c4704df92e207c891d13fa0e85b72e1e75279e (diff) |
simplify time-axis packing: consistent table layout
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 538bdc1029..f474acd007 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -157,8 +157,8 @@ AutomationTimeAxisView::AutomationTimeAxisView ( } name_label.set_text (_name); - name_label.set_alignment (Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - name_label.set_name (X_("TrackParameterName")); + name_label.set_alignment (Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER); + name_label.set_name (X_("TrackParameterName")); name_label.set_ellipsize (Pango::ELLIPSIZE_END); string tipname = nomparent; @@ -169,16 +169,19 @@ AutomationTimeAxisView::AutomationTimeAxisView ( ARDOUR_UI::instance()->set_tip(controls_ebox, tipname); /* add the buttons */ - controls_table.attach (hide_button, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND); - controls_table.attach (name_label, 0, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND); - controls_table.attach (auto_button, 6, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND); + controls_table.remove (name_hbox); + controls_table.attach (hide_button, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + controls_table.attach (name_label, 1, 3, 1, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 2, 0); + controls_table.attach (auto_button, 3, 4, 2, 3, Gtk::SHRINK, Gtk::SHRINK); + controls_table.set_border_width (0); name_label.show (); + hide_button.show (); if (_controller) { _controller.get()->set_size_request(-1, 24); /* add bar controller */ - controls_table.attach (*_controller.get(), 1, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND); + controls_table.attach (*_controller.get(), 1, 4, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND); /* note that this handler connects *before* the default handler */ _controller->event_widget().signal_scroll_event().connect (mem_fun (*this, &AutomationTimeAxisView::controls_ebox_scroll), false); } @@ -424,11 +427,13 @@ AutomationTimeAxisView::set_height (uint32_t h) if (h >= preset_height (HeightNormal)) { auto_button.show(); - hide_button.show_all(); + name_label.show(); + hide_button.show(); } else if (h >= preset_height (HeightSmall)) { controls_table.hide_all (); auto_button.hide(); + name_label.hide(); } } |