]> git.donarmstrong.com Git - lilypond.git/commitdiff
Grob alignment: get back 2.19.9 behaviour
authorJanek Warchoł <lemniskata.bernoullego@gmail.com>
Sat, 9 Aug 2014 19:08:08 +0000 (21:08 +0200)
committerJanek Warchoł <lemniskata.bernoullego@gmail.com>
Sat, 9 Aug 2014 19:22:28 +0000 (21:22 +0200)
A series of commits

*   0bc7f77 Issue 3978: Merge alignment cleanup
|\
| * d6604b0 define-grobs.scm: reorder properties alphabetically
| * 6f3f8f0 TextScript, CombineTextScript: use aligned_on_parent
| * 1d76502 Replace XY-offset closures with aligned_on_parent where possible
| * 09412c2 Clean up DynamicText horizontal alignment.
|/

changed how some grobs (notably DynamicTexts) reacted to overriding
self-alignment-X property.  The new behaviour was confusing for some
users, so this commit gets back the old behaviour.  The possibility
of using separate alignment factors for grob and its parent, introduced
by previous commit (see Issue 4022), makes it possible to get pre-0bc7f77
behaviour just by changing default values of parent-alignment-*; leaving
up the possibility to easily change them in the future.

See http://lists.gnu.org/archive/html/lilypond-user/2014-07/msg00691.html
and https://code.google.com/p/lilypond/issues/detail?id=4036
for details.

scm/define-grobs.scm

index ce418e8cf8f9e650e1d5ea1f6bb191e4412f0bd4..53401d3a42daf2362d464c7bd42ad11c260382e6 100644 (file)
@@ -79,6 +79,7 @@
         (font-size . -2)
         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
         (outside-staff-priority . 0)
+        (parent-alignment-X . ,CENTER)
         (script-priority . 0)
         (self-alignment-X . ,CENTER)
         (side-axis . ,Y)
                    X 'color))
         (font-shape . italic)
         (font-size . -4)
+        (parent-alignment-X . ,CENTER)
         (self-alignment-X . ,CENTER)
         (staff-padding . 0.7)
         (stencil . ,ly:text-interface::print)
         (font-series . bold)
         (outside-staff-priority . 450)
         (padding . 0.5)
+        (parent-alignment-X . #f)
         (script-priority . 200)
         (self-alignment-X . #f)
         (side-axis . ,Y)
         (font-encoding . fetaText)
         (font-size . -2)
         (padding . 0.2)
+        (parent-alignment-X . ,CENTER)
         (self-alignment-X . ,CENTER)
         (side-axis . ,Y)
         (staff-padding . 0.25)
         (font-encoding . fetaText)
         (font-series . bold)
         (font-shape . italic)
+        (parent-alignment-X . ,CENTER)
         (positioning-done . ,ly:script-interface::calc-positioning-done)
         (right-padding . 0.5)
         (self-alignment-X . ,CENTER)
         (font-encoding . fetaText)
         (font-size . -5)                ; don't overlap when next to heads.
         (padding . 0.5)
+        (parent-alignment-X . ,CENTER)
+        (parent-alignment-Y . ,CENTER)
         (positioning-done . ,ly:script-interface::calc-positioning-done)
         (script-priority . 100)
         (self-alignment-X . ,CENTER)
     (GridLine
      . (
         (layer . 0)
+        (parent-alignment-X . ,CENTER)
         (self-alignment-X . ,CENTER)
         (stencil . ,ly:grid-line-interface::print)
         (X-extent . ,ly:grid-line-interface::width)
         (direction . ,UP)
         (font-encoding . fetaText)
         (padding . 0.4)
+        (parent-alignment-X . ,CENTER)
         (self-alignment-X . ,CENTER)
         (side-axis . ,Y)
         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
         (direction . ,UP)
         (outside-staff-priority . 450)
         (padding . 0.2)
+        (parent-alignment-X . ,CENTER)
         (self-alignment-X . ,CENTER)
         (skyline-horizontal-padding . 0.2)
         (staff-padding . 0.25)
         (font-encoding . fetaText)
         (font-size . -2)
         (padding . 0.2)
+        (parent-alignment-X . ,CENTER)
         (self-alignment-X . ,CENTER)
         (staff-padding . 0.25)
         (stencil . ,ly:text-interface::print)
         (beam-thickness . 0.48) ; staff-space
         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
         (direction . ,ly:stem-tremolo::calc-direction)
+        (parent-alignment-X . ,CENTER)
         (slope . ,ly:stem-tremolo::calc-slope)
         (stencil . ,ly:stem-tremolo::print)
         (style . ,ly:stem-tremolo::calc-style)
         (font-encoding . fetaText)
         (font-size . -5)                ; don't overlap when next to heads.
         (padding . 0.5)
+        (parent-alignment-X . ,CENTER)
         (script-priority . 100)
         (self-alignment-X . ,CENTER)
         (self-alignment-Y . ,CENTER)
         (font-shape . italic)
         (font-size . -4)                ; don't overlap when next to heads.
         (padding . 0.5)
+        (parent-alignment-X . ,CENTER)
         (script-priority . 100)
         (self-alignment-X . ,CENTER)
         (self-alignment-Y . ,CENTER)
         ;; sync with Fingering ?
         (padding . 0.3)
 
+        (parent-alignment-X . #f)
         (script-priority . 200)
         ;; self-alignment cannot be LEFT because of fingering diagrams.
         (self-alignment-X . #f)