diff --git a/gtk2_ardour/ardour2_ui.rc b/gtk2_ardour/ardour2_ui.rc index 23823d27a3..35a2463bcc 100644 --- a/gtk2_ardour/ardour2_ui.rc +++ b/gtk2_ardour/ardour2_ui.rc @@ -838,11 +838,11 @@ style "track_controls_inactive" style "edit_controls_base_selected" { - bg[NORMAL] = { 0.56, 0.56, 0.56 } - bg[ACTIVE] = { 0.56, 0.56, 0.56 } - bg[INSENSITIVE] = { 0.56, 0.56, 0.56 } - bg[SELECTED] = { 0.56, 0.56, 0.56 } - bg[PRELIGHT] = { 0.56, 0.56, 0.56 } + bg[NORMAL] = { 0.60, 0.54, 0.60 } + bg[ACTIVE] = { 0.60, 0.54, 0.60 } + bg[INSENSITIVE] = { 0.60, 0.54, 0.60 } + bg[SELECTED] = { 0.60, 0.54, 0.60 } + bg[PRELIGHT] = { 0.60, 0.54, 0.60 } } style "automation_track_controls_base" diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index c3f53d266c..69653c9c99 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -686,7 +686,7 @@ AutomationTimeAxisView::get_selectables (nframes_t start, nframes_t end, double y_position is the "origin" or "top" of the track. */ - double mybot = y_position + height; // XXX need to include Editor::track_spacing; + double mybot = y_position + height; if (y_position >= top && mybot <= bot) { diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index b1e1873e94..39e3098fa4 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -271,7 +271,6 @@ Editor::Editor () no_route_list_redisplay = false; verbose_cursor_on = true; route_removal = false; - track_spacing = 0; show_automatic_regions_in_region_list = true; region_list_sort_type = (Editing::RegionListSortType) 0; have_pending_keyboard_selection = false; @@ -366,12 +365,13 @@ Editor::Editor () edit_cursor_clock.ValueChanged.connect (mem_fun(*this, &Editor::edit_cursor_clock_changed)); + time_canvas_vbox.pack_start (*_ruler_separator, false, false); time_canvas_vbox.pack_start (*minsec_ruler, false, false); time_canvas_vbox.pack_start (*smpte_ruler, false, false); time_canvas_vbox.pack_start (*frames_ruler, false, false); time_canvas_vbox.pack_start (*bbt_ruler, false, false); time_canvas_vbox.pack_start (time_canvas, true, true); - time_canvas_vbox.set_size_request (-1, (int)(timebar_height * visible_timebars)); + time_canvas_vbox.set_size_request (-1, (int)(timebar_height * visible_timebars) + 2); bbt_label.set_name ("EditorTimeButton"); bbt_label.set_size_request (-1, (int)timebar_height); @@ -424,6 +424,9 @@ Editor::Editor () time_button_event_box.set_name ("TimebarLabelBase"); time_button_event_box.signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_label_button_release)); + time_button_frame.add(time_button_event_box); + time_button_frame.property_shadow_type() = Gtk::SHADOW_OUT; + /* these enable us to have a dedicated window (for cursor setting, etc.) for the canvas areas. */ @@ -441,7 +444,7 @@ Editor::Editor () edit_packer.attach (edit_vscrollbar, 0, 1, 1, 3, FILL, FILL|EXPAND, 0, 0); - edit_packer.attach (time_button_event_box, 1, 2, 0, 1, FILL, FILL, 0, 0); + edit_packer.attach (time_button_frame, 0, 2, 0, 1, FILL, FILL, 0, 0); edit_packer.attach (time_canvas_event_box, 2, 3, 0, 1, FILL|EXPAND, FILL, 0, 0); edit_packer.attach (controls_layout, 1, 2, 1, 2, FILL, FILL|EXPAND, 0, 0); diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index c3829f32fc..20e6429aae 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -501,6 +501,7 @@ class Editor : public PublicEditor Gtk::EventBox time_canvas_event_box; Gtk::EventBox track_canvas_event_box; Gtk::EventBox time_button_event_box; + Gtk::Frame time_button_frame; ArdourCanvas::Group *minsec_group; ArdourCanvas::Group *bbt_group; @@ -557,6 +558,7 @@ class Editor : public PublicEditor gint metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint); gint metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint); + Gtk::Widget *_ruler_separator; GtkWidget *_smpte_ruler; GtkWidget *_bbt_ruler; GtkWidget *_frames_ruler; @@ -803,7 +805,6 @@ class Editor : public PublicEditor void named_selection_display_selection_changed (); /* track views */ - int track_spacing; TrackViewList track_views; TimeAxisView *trackview_by_y_position (double ypos); diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 7ba5e616ff..d9fe6f529f 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -141,33 +141,33 @@ Editor::initialize_canvas () range_marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 3.0); transport_marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 4.0); - tempo_bar = new ArdourCanvas::SimpleRect (*tempo_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); + tempo_bar = new ArdourCanvas::SimpleRect (*tempo_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0); tempo_bar->property_fill_color_rgba() = color_map[cTempoBar]; tempo_bar->property_outline_pixels() = 0; - meter_bar = new ArdourCanvas::SimpleRect (*meter_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); + meter_bar = new ArdourCanvas::SimpleRect (*meter_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0); meter_bar->property_fill_color_rgba() = color_map[cMeterBar]; meter_bar->property_outline_pixels() = 0; - marker_bar = new ArdourCanvas::SimpleRect (*marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); + marker_bar = new ArdourCanvas::SimpleRect (*marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0); marker_bar->property_fill_color_rgba() = color_map[cMarkerBar]; marker_bar->property_outline_pixels() = 0; - range_marker_bar = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); + range_marker_bar = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0); range_marker_bar->property_fill_color_rgba() = color_map[cRangeMarkerBar]; range_marker_bar->property_outline_pixels() = 0; - transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); + transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0); transport_marker_bar->property_fill_color_rgba() = color_map[cTransportMarkerBar]; transport_marker_bar->property_outline_pixels() = 0; - range_bar_drag_rect = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); + range_bar_drag_rect = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0); range_bar_drag_rect->property_fill_color_rgba() = color_map[cRangeDragBarRectFill]; range_bar_drag_rect->property_outline_color_rgba() = color_map[cRangeDragBarRect]; range_bar_drag_rect->property_outline_pixels() = 0; range_bar_drag_rect->hide (); - transport_bar_drag_rect = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); + transport_bar_drag_rect = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0); transport_bar_drag_rect ->property_fill_color_rgba() = color_map[cTransportDragRectFill]; transport_bar_drag_rect->property_outline_color_rgba() = color_map[cTransportDragRect]; transport_bar_drag_rect->property_outline_pixels() = 0; @@ -321,14 +321,9 @@ Editor::track_canvas_size_allocated () for (i = track_views.begin(); i != track_views.end(); ++i) { if ((*i)->control_parent) { height += (*i)->effective_height; - height += track_spacing; } } - if (height) { - height -= track_spacing; - } - full_canvas_height = height; } @@ -391,7 +386,6 @@ Editor::reset_scrolling_region (Gtk::Allocation* alloc) TimeAxisView *tv = (*i)[route_display_columns.tv]; if (tv != 0 && !tv->hidden()) { pos += tv->effective_height; - pos += track_spacing; } } @@ -416,7 +410,6 @@ Editor::controls_layout_size_request (Requisition* req) TimeAxisView *tv = (*i)[route_display_columns.tv]; if (tv != 0) { pos += tv->effective_height; - pos += track_spacing; } } diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc index 3983220113..1876b17f10 100644 --- a/gtk2_ardour/editor_route_list.cc +++ b/gtk2_ardour/editor_route_list.cc @@ -259,7 +259,6 @@ Editor::redisplay_route_list () if (visible) { tv->set_marked_for_display (true); position += tv->show_at (position, n, &edit_controls_vbox); - position += track_spacing; } else { tv->hide (); } diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index 99edc03d7d..9dac8bc4c0 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -55,6 +55,10 @@ Editor::initialize_rulers () ruler_editor = this; ruler_grabbed_widget = 0; + _ruler_separator = new Gtk::HSeparator(); + _ruler_separator->set_size_request(-1, 2); + _ruler_separator->show(); + _smpte_ruler = gtk_custom_hruler_new (); smpte_ruler = Glib::wrap (_smpte_ruler); smpte_ruler->set_name ("SMPTERuler"); @@ -600,6 +604,7 @@ Editor::update_ruler_visibility () frames_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion)); minsec_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion)); + ruler_children.insert (canvaspos, Element(*_ruler_separator, PACK_SHRINK, PACK_START)); if (ruler_shown[ruler_metric_minsec]) { lab_children.push_back (Element(minsec_label, PACK_SHRINK, PACK_START)); @@ -625,7 +630,7 @@ Editor::update_ruler_visibility () visible_timebars++; } - double tbpos = 0.0; + double tbpos = 1.0; double old_unit_pos ; if (ruler_shown[ruler_time_meter]) { @@ -707,7 +712,7 @@ Editor::update_ruler_visibility () tempo_map_changed(Change (0), false); time_canvas_event_box.show_all(); - time_button_event_box.show_all(); + time_button_frame.show_all(); } void diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 2a0087dc2c..95b0002f94 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -147,7 +147,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisVie controls_frame.add (controls_hbox); controls_frame.set_name ("TimeAxisViewControlsBaseUnselected"); - controls_frame.set_shadow_type (Gtk::SHADOW_OUT); + controls_frame.set_shadow_type (Gtk::SHADOW_ETCHED_OUT); ColorChanged.connect (mem_fun (*this, &TimeAxisView::color_handler)); } @@ -233,7 +233,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent) if (canvas_item_visible ((*i)->canvas_display)) { ++nth; - effective_height += (*i)->show_at (y + 1 + effective_height, nth, parent); + effective_height += (*i)->show_at (y + effective_height, nth, parent); } } @@ -361,7 +361,7 @@ void TimeAxisView::set_height_pixels (uint32_t h) { height = h; - controls_frame.set_size_request (-1, height); + controls_frame.set_size_request (-1, height + ((order == 0) ? 1 : 0)); if (canvas_item_visible (selection_group)) { /* resize the selection rect */ @@ -846,7 +846,7 @@ TimeAxisView::touched (double top, double bot) y_position is the "origin" or "top" of the track. */ - double mybot = y_position + height; // XXX need to include Editor::track_spacing; + double mybot = y_position + height; return ((y_position <= bot && y_position >= top) || ((mybot <= bot) && (top < mybot)) ||