X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftime_axis_view.cc;h=8d2e94a13b5c32db140929b4675cc00e026ad5de;hb=e3d9a971a735174687067cb7d7b9419c7ecbb114;hp=85535ca82d5629fdab59a6a667d4b0ee803b1bf2;hpb=58a700e96878ee5ea61388320c594addb4641bf2;p=ardour.git diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 85535ca82d..8d2e94a13b 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -67,8 +67,8 @@ using namespace ArdourCanvas; using Gtkmm2ext::Keyboard; const double trim_handle_size = 6.0; /* pixels */ -uint32_t TimeAxisView::extra_height; -uint32_t TimeAxisView::small_height; +uint32_t TimeAxisView::button_height = 0; +uint32_t TimeAxisView::extra_height = 0; int const TimeAxisView::_max_order = 512; PBD::Signal1 TimeAxisView::CatchDeletion; @@ -136,8 +136,9 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie name_hbox.show (); controls_table.set_size_request (200); - controls_table.set_row_spacings (0); - controls_table.set_col_spacings (0); + controls_table.set_row_spacings (2); + controls_table.set_col_spacings (2); + controls_table.set_border_width (2); controls_table.set_homogeneous (true); controls_table.attach (name_hbox, 0, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 3, 0); @@ -397,7 +398,7 @@ TimeAxisView::controls_ebox_motion (GdkEventMotion* ev) } bool -TimeAxisView::controls_ebox_leave (GdkEventCrossing* ev) +TimeAxisView::controls_ebox_leave (GdkEventCrossing*) { if (_have_preresize_cursor) { gdk_window_set_cursor (controls_ebox.get_window()->gobj(), _preresize_cursor); @@ -563,13 +564,25 @@ TimeAxisView::name_entry_key_release (GdkEventKey* ev) name_entry_changed (); TrackViewList const & allviews = _editor.get_track_views (); TrackViewList::const_iterator i = find (allviews.begin(), allviews.end(), this); + if (ev->keyval == GDK_Tab) { if (i != allviews.end()) { do { if (++i == allviews.end()) { return true; } - } while((*i)->hidden()); + + RouteTimeAxisView* rtav = dynamic_cast(*i); + + if (rtav && rtav->route()->record_enabled()) { + continue; + } + + if (!(*i)->hidden()) { + break; + } + + } while (true); } } else { if (i != allviews.begin()) { @@ -577,12 +590,27 @@ TimeAxisView::name_entry_key_release (GdkEventKey* ev) if (i == allviews.begin()) { return true; } + --i; - } while ((*i)->hidden()); + + RouteTimeAxisView* rtav = dynamic_cast(*i); + + if (rtav && rtav->route()->record_enabled()) { + continue; + } + + if (!(*i)->hidden()) { + break; + } + + } while (true); } } - (*i)->name_entry.grab_focus(); + if ((i != allviews.end()) && (*i != this) && !(*i)->hidden()) { + (*i)->name_entry.grab_focus(); + _editor.ensure_time_axis_view_is_visible (**i); + } } return true; @@ -1065,7 +1093,8 @@ TimeAxisView::compute_heights () Button* buttons[5]; const int border_width = 2; - extra_height = (2 * border_width); + const int separator_height = 2; + extra_height = (2 * border_width) + separator_height; window.add (one_row_table); @@ -1090,8 +1119,7 @@ TimeAxisView::compute_heights () Gtk::Requisition req(one_row_table.size_request ()); // height required to show 1 row of buttons - - small_height = req.height + (2 * border_width); + button_height = req.height; } void @@ -1214,15 +1242,15 @@ TimeAxisView::preset_height (Height h) { switch (h) { case HeightLargest: - return extra_height + 48 + 250; + return (button_height * 2) + extra_height + 250; case HeightLarger: - return extra_height + 48 + 150; + return (button_height * 2) + extra_height + 150; case HeightLarge: - return extra_height + 48 + 50; + return (button_height * 2) + extra_height + 50; case HeightNormal: - return extra_height + 48; + return (button_height * 2) + extra_height; case HeightSmall: - return small_height; + return button_height + extra_height; } /* NOTREACHED */