summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorSampo Savolainen <v2@iki.fi>2006-11-17 20:37:57 +0000
committerSampo Savolainen <v2@iki.fi>2006-11-17 20:37:57 +0000
commitc15da851511c565d3e71f3484d6deb359e098ebe (patch)
tree6059173bdc95cfaaf6b041c80640d4943b99193e /gtk2_ardour/editor.cc
parent595b12c6a2932c4fec29f695f7f518f36a3fcd59 (diff)
Brian Ahr's patch to make notebook size in maximized mode persist at
runtime. git-svn-id: svn://localhost/ardour2/trunk@1140 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index c48e5f1ddd..462564cd77 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -637,6 +637,8 @@ Editor::Editor (AudioEngine& eng)
the_notebook.popup_enable ();
the_notebook.set_tab_pos (Gtk::POS_RIGHT);
+ post_maximal_editor_width = 0;
+ post_maximal_pane_position = 0;
edit_pane.pack1 (edit_packer, true, true);
edit_pane.pack2 (the_notebook, false, true);
@@ -3997,10 +3999,18 @@ Editor::maximise_editing_space ()
pre_maximal_pane_position = edit_pane.get_position();
pre_maximal_editor_width = this->get_width();
- edit_pane.set_position (edit_pane.get_width());
+ if(post_maximal_pane_position == 0) {
+ post_maximal_pane_position = edit_pane.get_width();
+ }
fullscreen();
+ if(post_maximal_editor_width) {
+ edit_pane.set_position (post_maximal_pane_position -
+ abs(post_maximal_editor_width - pre_maximal_editor_width));
+ } else {
+ edit_pane.set_position (post_maximal_pane_position);
+ }
}
void
@@ -4008,10 +4018,16 @@ Editor::restore_editing_space ()
{
initial_ruler_update_required = true;
+ // user changed width of pane during fullscreen
+ if(post_maximal_pane_position != edit_pane.get_position()) {
+ post_maximal_pane_position = edit_pane.get_position();
+ }
+
unfullscreen();
mouse_mode_tearoff->set_visible (true);
tools_tearoff->set_visible (true);
+ post_maximal_editor_width = this->get_width();
edit_pane.set_position (