From db90906c7ced54694fcfcefeb5ca34d6bdee99d6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 22 Jan 2025 16:07:29 +0100 Subject: [PATCH] Remove notebook tab shrinking Various tabs on the current editor-sidebar do not allow shrinking (so that only tabs remain visible). Double-click shrinking was also never implemented on other page sidebars, and was not missed by any users there. --- gtk2_ardour/editor.cc | 28 ---------------------------- gtk2_ardour/editor.h | 1 - 2 files changed, 29 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 603fcfc5b2..e96dc01547 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -226,7 +226,6 @@ Editor::Editor () , no_save_visual (false) , marker_click_behavior (MarkerClickSelectOnly) , _join_object_range_state (JOIN_OBJECT_RANGE_NONE) - , _notebook_shrunk (false) , _show_marker_lines (false) , clicked_axisview (0) , clicked_routeview (0) @@ -567,17 +566,11 @@ Editor::Editor () _the_notebook.set_tab_pos (Gtk::POS_RIGHT); _the_notebook.show_all (); - _notebook_shrunk = false; - /* Pick up some settings we need to cache, early */ XMLNode* settings = ARDOUR_UI::instance()->editor_settings(); - if (settings) { - settings->get_property ("notebook-shrunk", _notebook_shrunk); - } - editor_summary_pane.set_check_divider_position (true); editor_summary_pane.add (edit_packer); @@ -2301,7 +2294,6 @@ Editor::get_state () const node->add_child_nocopy (Tabbable::get_state()); - node->set_property("notebook-shrunk", _notebook_shrunk); node->set_property("edit-vertical-pane-pos", editor_summary_pane.get_divider()); maybe_add_mixer_strip_width (*node); @@ -5565,26 +5557,6 @@ Editor::notebook_tab_clicked (GdkEventButton* ev, Gtk::Widget* page) _the_notebook.set_current_page (_the_notebook.page_num (*page)); } - if (ev->type == GDK_2BUTTON_PRESS) { - - /* double-click on a notebook tab shrinks or expands the notebook */ - - if (_notebook_shrunk) { - if (pre_notebook_shrink_pane_width) { - content_right_pane.set_divider (0, *pre_notebook_shrink_pane_width); - } - _notebook_shrunk = false; - } else { - pre_notebook_shrink_pane_width = content_right_pane.get_divider(); - - /* this expands the LHS of the edit pane to cover the notebook - PAGE but leaves the tabs visible. - */ - content_right_pane.set_divider (0, content_right_pane.get_divider() + page->get_width()); - _notebook_shrunk = true; - } - } - return true; } diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 0c0c3e7619..6f8f84631b 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -586,7 +586,6 @@ private: Gtk::VBox _editor_list_vbox; Gtk::Notebook _the_notebook; - bool _notebook_shrunk; void add_notebook_page (std::string const&, Gtk::Widget&); bool notebook_tab_clicked (GdkEventButton*, Gtk::Widget*);