summaryrefslogtreecommitdiff
path: root/gtk2_ardour/marker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/marker.cc')
-rw-r--r--gtk2_ardour/marker.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index 2d9da96b0f..c018ba54e7 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -535,6 +535,25 @@ TempoMarker::~TempoMarker ()
{
}
+void
+TempoMarker::update_height_mark (const double& ratio)
+{
+ const double MH = marker_height;
+ const double top = MH * (1 - ratio);
+ const double M3 = std::max(1.f, rintf(3.f * UIConfiguration::instance().get_ui_scale()));
+ const double M6 = std::max(2.f, rintf(6.f * UIConfiguration::instance().get_ui_scale()));
+
+ points = new ArdourCanvas::Points ();
+ points->push_back (ArdourCanvas::Duple ( M3, top));
+ points->push_back (ArdourCanvas::Duple ( M6, min (top + (MH * .6), MH)));
+ points->push_back (ArdourCanvas::Duple ( M6, MH));
+ points->push_back (ArdourCanvas::Duple (0.0, MH));
+ points->push_back (ArdourCanvas::Duple (0.0, min (top + (MH * .6), MH)));
+ points->push_back (ArdourCanvas::Duple ( M3, top));
+
+ mark->set (*points);
+}
+
/***********************************************************************/
MeterMarker::MeterMarker (PublicEditor& editor, ArdourCanvas::Container& parent, guint32 rgba, const string& text,