summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas.cc
diff options
context:
space:
mode:
authorDoug McLain <doug@nostar.net>2008-01-05 10:00:32 +0000
committerDoug McLain <doug@nostar.net>2008-01-05 10:00:32 +0000
commit56d529290af04cd70e66b914cfbe67fdd00ebaa0 (patch)
tree74fb5d94f2e5723b4be3fc685d548955a2ab8c2e /gtk2_ardour/editor_canvas.cc
parentc5e2ffa8a7d9e6602bb2025f2d3fdf689b608520 (diff)
This fixes the gap left in between the controls layout and the track/time canvas when the meters are hidden or controls are shrunk for other reasons. The canvas resizes to fill in the gap
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2829 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r--gtk2_ardour/editor_canvas.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 1af8bad997..b02543767a 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -282,7 +282,6 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
}
initial_ruler_update_required = false;
-
track_canvas_size_allocated ();
}
@@ -381,8 +380,8 @@ Editor::controls_layout_size_request (Requisition* req)
TreeModel::Children::iterator i;
double pos;
- for (pos = 0, i = rows.begin(); i != rows.end(); ++i) {
- TimeAxisView *tv = (*i)[route_display_columns.tv];
+ for (pos = 0, i = rows.begin(); i != rows.end(); ++i) {
+ TimeAxisView *tv = (*i)[route_display_columns.tv];
if (tv != 0) {
pos += tv->effective_height;
}
@@ -394,12 +393,9 @@ Editor::controls_layout_size_request (Requisition* req)
screen = Gdk::Screen::get_default();
}
- /* never let the width of the controls area shrink horizontally */
-
edit_controls_vbox.check_resize();
-
req->width = max (edit_controls_vbox.get_width(), controls_layout.get_width());
-
+
/* don't get too big. the fudge factors here are just guesses */
req->width = min (req->width, screen->get_width() - 300);
@@ -408,8 +404,13 @@ Editor::controls_layout_size_request (Requisition* req)
/* this one is important: it determines how big the layout thinks it really is, as
opposed to what it displays on the screen
*/
+
+ controls_layout.set_size (edit_controls_vbox.get_width(), (gint) pos);
+ controls_layout.set_size_request(edit_controls_vbox.get_width(), -1);
+ zoom_box.set_size_request(edit_controls_vbox.get_width(), -1);
+ time_button_frame.set_size_request(edit_controls_vbox.get_width() + edit_vscrollbar.get_width(), -1);
- controls_layout.set_size (req->width, (gint) pos);
+ //cerr << "sizes = " << req->width << " " << edit_controls_vbox.get_width() << " " << controls_layout.get_width() << " " << zoom_box.get_width() << " " << time_button_frame.get_width() << endl;//DEBUG
}
bool