From 65c2782e6ed4bd7c5ee2c39dc9dece66a0bb4578 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 7 Jul 2011 13:15:53 +0000 Subject: [PATCH] fix up horizontal sizing of the track controls area in the editor git-svn-id: svn://localhost/ardour2/branches/3.0@9797 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_canvas.cc | 9 +++++++-- gtk2_ardour/midi_time_axis.cc | 12 ++++++++---- gtk2_ardour/time_axis_view.cc | 8 +++++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 1066023e0d..f761cfd42b 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -334,10 +334,15 @@ Editor::track_canvas_size_allocated () void Editor::reset_controls_layout_width () { - gint w = edit_controls_vbox.get_width(); + GtkRequisition req; + gint w; + + edit_controls_vbox.size_request (req); + w = req.width; if (_group_tabs->is_mapped()) { - w += _group_tabs->get_width(); + _group_tabs->size_request (req); + w += req.width; } /* the controls layout has no horizontal scrolling, its visible diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 6fbb5eaf28..8ebe40c864 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -316,15 +316,19 @@ MidiTimeAxisView::set_height (uint32_t h) } if (height >= KEYBOARD_MIN_HEIGHT) { - if (is_track() && _range_scroomer) + if (is_track() && _range_scroomer) { _range_scroomer->show(); - if (is_track() && _piano_roll_header) + } + if (is_track() && _piano_roll_header) { _piano_roll_header->show(); + } } else { - if (is_track() && _range_scroomer) + if (is_track() && _range_scroomer) { _range_scroomer->hide(); - if (is_track() && _piano_roll_header) + } + if (is_track() && _piano_roll_header) { _piano_roll_header->hide(); + } } } diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 37e434c7d8..aff4b32abf 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -171,7 +171,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie controls_ebox.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_release)); controls_ebox.signal_scroll_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_scroll), true); - controls_hbox.pack_start (controls_ebox, false, false); + controls_hbox.pack_start (controls_ebox, true, true); controls_hbox.show (); time_axis_vbox.pack_start (controls_hbox, true, true); @@ -293,9 +293,11 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent) _canvas_background->raise_to_top (); _canvas_display->raise_to_top (); - time_axis_vbox.show (); - controls_ebox.show (); + // time_axis_vbox.show (); + // controls_ebox.show (); + _canvas_background->show (); + _canvas_display->show (); _hidden = false;