diff options
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 14 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/editor_route_list.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 5 | ||||
-rw-r--r-- | libs/gtkmm2ext/utils.cc | 4 |
6 files changed, 21 insertions, 11 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 83fd5ee78f..c1ccc52fc9 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -161,10 +161,10 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press)); mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release)); rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press)); - edit_group_button.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::edit_click)); + edit_group_button.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::edit_click), false); playlist_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::playlist_click)); automation_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::automation_click)); - size_button.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::size_click)); + size_button.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::size_click), false); visual_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::visual_click)); hide_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::hide_click)); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index c54dc888ae..6b6e8b98bf 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -388,6 +388,7 @@ Editor::Editor (AudioEngine& eng) // edit_controls_hbox.pack_start (edit_controls_vbox, true, true); controls_layout.add (edit_controls_vbox); controls_layout.set_name ("EditControlsBase"); + controls_layout.signal_size_request().connect (mem_fun(*this, &Editor::set_layout_width), false); controls_layout.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK); controls_layout.signal_button_release_event().connect (mem_fun(*this, &Editor::edit_controls_button_release)); @@ -476,12 +477,12 @@ Editor::Editor (AudioEngine& eng) edit_packer.set_homogeneous (false); edit_packer.set_name ("EditorWindow"); - edit_packer.attach (edit_hscrollbar, 1, 2, 0, 1, FILL|EXPAND, FILL, 0, 0); + edit_packer.attach (edit_hscrollbar, 1, 2, 0, 1, FILL|EXPAND, FILL, 0, 0); edit_packer.attach (time_button_event_box, 0, 1, 1, 2, FILL, FILL, 0, 0); edit_packer.attach (time_canvas_event_box, 1, 2, 1, 2, FILL|EXPAND, FILL, 0, 0); - edit_packer.attach (controls_layout, 0, 1, 2, 3, FILL, FILL, 0, 0); + edit_packer.attach (controls_layout, 0, 1, 2, 3, FILL, FILL|EXPAND, 0, 0); edit_packer.attach (track_canvas_event_box, 1, 2, 2, 3, FILL|EXPAND, FILL|EXPAND, 0, 0); edit_packer.attach (edit_vscrollbar, 2, 3, 2, 3, FILL, FILL|EXPAND, 0, 0); @@ -3923,3 +3924,12 @@ Editor::transport_punch_location() return 0; } } + +void +Editor::set_layout_width(Gtk::Requisition *r) +{ + edit_controls_vbox.check_resize(); + int w = edit_controls_vbox.get_width(); + cerr << "set_layout_width() called w = " << w << endl; + controls_layout.set_size_request (w, -1); +} diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index f54ed00752..a5f7a39b22 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -642,6 +642,7 @@ class Editor : public PublicEditor Gtk::Adjustment horizontal_adjustment; Gtk::Layout controls_layout; + void set_layout_width(Gtk::Requisition *); Gtk::HScrollbar edit_hscrollbar; bool edit_hscroll_dragging; diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc index b3da7e5bed..b7b36dfd30 100644 --- a/gtk2_ardour/editor_route_list.cc +++ b/gtk2_ardour/editor_route_list.cc @@ -227,8 +227,8 @@ Editor::route_list_reordered () long order; int n; - for (n = 0, order = 0, i = rows.begin(); i != rows.end(); ++i, ++order) { - TimeAxisView *tv = (*i)[route_display_columns.tv]; + for (n = 0, order = 0, i = rows.begin(); i != rows.end(); ++i, ++order) { + TimeAxisView *tv = (*i)[route_display_columns.tv]; AudioTimeAxisView* at; if (!ignore_route_list_reorder) { diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index b9ff987d53..8f9ba4c7f4 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -185,7 +185,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent) { gdouble ix1, ix2, iy1, iy2; effective_height = 0; - + if (control_parent) { control_parent->reorder_child (controls_frame, nth); } else { @@ -193,10 +193,9 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent) parent->pack_start (controls_frame, false, false); parent->reorder_child (controls_frame, nth); } - controls_frame.show (); controls_ebox.show (); - + /* the coordinates used here are in the system of the item's parent ... */ diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc index 23b4c3b5d5..d52ab42ee7 100644 --- a/libs/gtkmm2ext/utils.cc +++ b/libs/gtkmm2ext/utils.cc @@ -35,10 +35,10 @@ Gtkmm2ext::set_size_request_to_display_given_text (Gtk::Widget &w, const gchar * { int height = 0; - int width = 0; + int width = 0; w.ensure_style (); - w.create_pango_layout(text)->get_pixel_size (width, height); + w.create_pango_layout(text)->get_pixel_size (width, height); height += vpadding; width += hpadding; |