]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 216: ability to change staff line spacing inside a \layout{} block
authorDavid Kastrup <dak@gnu.org>
Thu, 13 Nov 2014 20:13:12 +0000 (21:13 +0100)
committerDavid Kastrup <dak@gnu.org>
Mon, 24 Nov 2014 19:12:51 +0000 (20:12 +0100)
This uses the staff-space setting from the \layout block (if set) for
determining staff spacing.

It apparently does not help with horizontal spacing, though.

lily/staff-symbol.cc

index e2c199633a1933246ab5ed3a94d2cac7ae4d3ef5..41814441885c51db24833e8eab44702b1e61214e 100644 (file)
@@ -263,7 +263,9 @@ Staff_symbol::line_count (Grob *me)
 Real
 Staff_symbol::staff_space (Grob *me)
 {
-  return robust_scm2double (me->get_property ("staff-space"), 1.0);
+  Real ss = me->layout ()->get_dimension (ly_symbol2scm ("staff-space"));
+
+  return robust_scm2double (me->get_property ("staff-space"), 1.0) * ss;
 }
 
 Real