From e069b0c7975d301cdee48cc3925b7f1bfcb1d9bd Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 27 Feb 2018 16:39:49 -0600 Subject: [PATCH] Implement grid line colors ( was: measure lines ). This restores measure lines to a brighter color than beats. --- gtk2_ardour/grid_lines.cc | 12 ++++++++++-- gtk2_ardour/themes/blueberry_milk-ardour.colors | 8 +++++--- gtk2_ardour/themes/caineville-ardour.colors | 7 ++++--- gtk2_ardour/themes/clear_gray-ardour.colors | 7 ++++--- gtk2_ardour/themes/cubasish-ardour.colors | 7 ++++--- gtk2_ardour/themes/dark-ardour.colors | 7 ++++--- gtk2_ardour/themes/unastudia-ardour.colors | 7 ++++--- 7 files changed, 35 insertions(+), 20 deletions(-) diff --git a/gtk2_ardour/grid_lines.cc b/gtk2_ardour/grid_lines.cc index c091fa395c..bdaf870054 100644 --- a/gtk2_ardour/grid_lines.cc +++ b/gtk2_ardour/grid_lines.cc @@ -58,13 +58,21 @@ GridLines::draw (std::vector marks) { lines.clear(); - const uint32_t c = UIConfiguration::instance().color_mod("measure line beat", "measure line beat"); + const uint32_t major_color = UIConfiguration::instance().color_mod("grid line major", "grid line"); + const uint32_t minor_color = UIConfiguration::instance().color_mod("grid line minor", "grid line"); + const uint32_t micro_color = UIConfiguration::instance().color_mod("grid line micro", "grid line"); for (vector::const_iterator m = marks.begin(); m != marks.end(); ++m) { samplepos_t s = m->position; - lines.add (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, c); + if ((*m).style == ArdourCanvas::Ruler::Mark::Major) { + lines.add (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, major_color); + } else if ((*m).style == ArdourCanvas::Ruler::Mark::Minor) { + lines.add (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, minor_color); + } else { + lines.add (PublicEditor::instance().sample_to_pixel_unrounded (s), 1.0, micro_color); + } } } diff --git a/gtk2_ardour/themes/blueberry_milk-ardour.colors b/gtk2_ardour/themes/blueberry_milk-ardour.colors index 0f3eba9359..b3b99bbb15 100644 --- a/gtk2_ardour/themes/blueberry_milk-ardour.colors +++ b/gtk2_ardour/themes/blueberry_milk-ardour.colors @@ -5,6 +5,7 @@ + @@ -234,8 +235,9 @@ - - + + + @@ -501,7 +503,7 @@ - + diff --git a/gtk2_ardour/themes/caineville-ardour.colors b/gtk2_ardour/themes/caineville-ardour.colors index cbe776b266..6cfdc2e761 100644 --- a/gtk2_ardour/themes/caineville-ardour.colors +++ b/gtk2_ardour/themes/caineville-ardour.colors @@ -171,6 +171,9 @@ + + + @@ -234,8 +237,6 @@ - - @@ -493,10 +494,10 @@ + - diff --git a/gtk2_ardour/themes/clear_gray-ardour.colors b/gtk2_ardour/themes/clear_gray-ardour.colors index df9c83351c..398a01fba1 100644 --- a/gtk2_ardour/themes/clear_gray-ardour.colors +++ b/gtk2_ardour/themes/clear_gray-ardour.colors @@ -170,6 +170,9 @@ + + + @@ -234,8 +237,6 @@ - - @@ -489,10 +490,10 @@ + - diff --git a/gtk2_ardour/themes/cubasish-ardour.colors b/gtk2_ardour/themes/cubasish-ardour.colors index ee33a808c1..8224ef3140 100644 --- a/gtk2_ardour/themes/cubasish-ardour.colors +++ b/gtk2_ardour/themes/cubasish-ardour.colors @@ -171,6 +171,9 @@ + + + @@ -234,8 +237,6 @@ - - @@ -493,10 +494,10 @@ + - diff --git a/gtk2_ardour/themes/dark-ardour.colors b/gtk2_ardour/themes/dark-ardour.colors index cb7844eace..3e1f0ba928 100644 --- a/gtk2_ardour/themes/dark-ardour.colors +++ b/gtk2_ardour/themes/dark-ardour.colors @@ -236,8 +236,9 @@ - - + + + @@ -519,7 +520,7 @@ - + diff --git a/gtk2_ardour/themes/unastudia-ardour.colors b/gtk2_ardour/themes/unastudia-ardour.colors index 0600b61f41..4c302dfc40 100644 --- a/gtk2_ardour/themes/unastudia-ardour.colors +++ b/gtk2_ardour/themes/unastudia-ardour.colors @@ -176,6 +176,9 @@ + + + @@ -239,8 +242,6 @@ - - @@ -498,10 +499,10 @@ + -