From: David Nalesnik Date: Tue, 28 Mar 2017 23:15:02 +0000 (-0500) Subject: Issue 5109: Allow 'staff-padding to work with MeasureCounter X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=637bb8f9bba9fd16804249d2d77556c61658eaf6;p=lilypond.git Issue 5109: Allow 'staff-padding to work with MeasureCounter -- 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. --- diff --git a/input/regression/measure-counter-staff-padding.ly b/input/regression/measure-counter-staff-padding.ly new file mode 100644 index 0000000000..cf07cca4c1 --- /dev/null +++ b/input/regression/measure-counter-staff-padding.ly @@ -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 +} diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 45cac04bd3..cdea705c4d 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1455,6 +1455,7 @@ (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