add Editor::ruler_divide_height to specify where the divide in the ruler is between the "upper" and "lower" section

This commit is contained in:
Paul Davis 2014-11-24 13:32:28 +02:00
parent b0e314a5b2
commit 32d656560d
4 changed files with 6 additions and 4 deletions

View file

@ -250,6 +250,7 @@ Editor::Editor ()
, _join_object_range_state (JOIN_OBJECT_RANGE_NONE) , _join_object_range_state (JOIN_OBJECT_RANGE_NONE)
, timebar_height (xml_property (*xml_tree ()->root (), "timebarheight", 17.0)) , timebar_height (xml_property (*xml_tree ()->root (), "timebarheight", 17.0))
, ruler_height (xml_property (*xml_tree ()->root (), "rulerheight", 26.0)) , ruler_height (xml_property (*xml_tree ()->root (), "rulerheight", 26.0))
, ruler_divide_height (xml_property (*xml_tree ()->root (), "rulerdivideheight", 13.0))
, marker_height (xml_property (*xml_tree ()->root (), "markerheight", 18)) , marker_height (xml_property (*xml_tree ()->root (), "markerheight", 18))
, skipbar_height (xml_property (*xml_tree ()->root (), "skipbarheight", 17)) , skipbar_height (xml_property (*xml_tree ()->root (), "skipbarheight", 17))
/* time display buttons */ /* time display buttons */

View file

@ -876,9 +876,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
const double timebar_height; const double timebar_height;
const double ruler_height; const double ruler_height;
const double ruler_divide_height;
const double marker_height; const double marker_height;
const double skipbar_height; const double skipbar_height;
Gtk::Menu *editor_ruler_menu; Gtk::Menu *editor_ruler_menu;
ArdourCanvas::Rectangle* tempo_bar; ArdourCanvas::Rectangle* tempo_bar;

View file

@ -200,8 +200,8 @@ Editor::initialize_canvas ()
range_bar_drag_rect->set_outline (false); range_bar_drag_rect->set_outline (false);
range_bar_drag_rect->hide (); range_bar_drag_rect->hide ();
/* drag bar for ruler is double height because it spans loop bar and the ruler */ transport_bar_drag_rect = new ArdourCanvas::Rectangle (ruler_group, ArdourCanvas::Rect (0.0, 0.0, 100,
transport_bar_drag_rect = new ArdourCanvas::Rectangle (ruler_group, ArdourCanvas::Rect (0.0, 0.0, 100, ruler_height)); ruler_height - ruler_divide_height));
CANVAS_DEBUG_NAME (transport_bar_drag_rect, "transport drag"); CANVAS_DEBUG_NAME (transport_bar_drag_rect, "transport drag");
transport_bar_drag_rect->set_outline (false); transport_bar_drag_rect->set_outline (false);
transport_bar_drag_rect->hide (); transport_bar_drag_rect->hide ();

View file

@ -109,7 +109,7 @@ Editor::add_new_location_internal (Location* location)
// no name shown ; actual marker is twice the height of the bar on which we drag, so that // no name shown ; actual marker is twice the height of the bar on which we drag, so that
// it covers the ruler as well. // it covers the ruler as well.
lam->start = new RulerMarker (location, *this, *ruler_group, ruler_height, ArdourCanvas::rgba_to_color (1.0, 1.0, 1.0, 0.4), lam->start = new RulerMarker (location, *this, *ruler_group, ruler_height - ruler_divide_height, ArdourCanvas::rgba_to_color (1.0, 1.0, 1.0, 0.4),
"", location->start(), location->end()); "", location->start(), location->end());
lam->end = 0; lam->end = 0;
group = ruler_group; group = ruler_group;