]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 5109: Allow 'staff-padding to work with MeasureCounter
authorDavid Nalesnik <david.nalesnik@gmail.com>
Tue, 28 Mar 2017 23:15:02 +0000 (18:15 -0500)
committerDavid Nalesnik <david.nalesnik@gmail.com>
Thu, 6 Apr 2017 18:30:10 +0000 (13:30 -0500)
 -- Set 'Y-offset in the grob description to the appropriate
callback.  (This is required for the default setting of
'staff-padding to have any effect.)

 -- Provide a regression test.

input/regression/measure-counter-staff-padding.ly [new file with mode: 0644]
scm/define-grobs.scm

diff --git a/input/regression/measure-counter-staff-padding.ly b/input/regression/measure-counter-staff-padding.ly
new file mode 100644 (file)
index 0000000..cf07cca
--- /dev/null
@@ -0,0 +1,30 @@
+\version "2.19.59"
+
+\header {
+  texidoc = "The @code{staff-padding} property may be used to adjust
+the distance of @code{MeasureCounter} objects from the staff.  The
+following example uses @code{staff-padding} to align the count
+vertically.
+"
+}
+
+\layout {
+  \context {
+    \Staff
+    \consists #Measure_counter_engraver
+  }
+}
+
+music = {
+  \startMeasureCount
+  c''2 c''
+  c'''2 c'''
+  \bar "||"
+  \stopMeasureCount
+}
+
+{
+  \music
+  \override Staff.MeasureCounter.staff-padding = 4
+  \music
+}
index 45cac04bd3d65b1146beec8acdf89b42bcf8be7c..cdea705c4d6f186122ed164e84b72f0a7079359f 100644 (file)
         (side-axis . ,Y)
         (staff-padding . 0.5)
         (stencil . ,measure-counter-stencil)
+        (Y-offset . ,side-position-interface::y-aligned-side)
         (meta . ((class . Spanner)
                  (interfaces . (font-interface
                                 measure-counter-interface