From 637bb8f9bba9fd16804249d2d77556c61658eaf6 Mon Sep 17 00:00:00 2001 From: David Nalesnik Date: Tue, 28 Mar 2017 18:15:02 -0500 Subject: [PATCH] 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. --- .../measure-counter-staff-padding.ly | 30 +++++++++++++++++++ scm/define-grobs.scm | 1 + 2 files changed, 31 insertions(+) create mode 100644 input/regression/measure-counter-staff-padding.ly 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 -- 2.39.2