From d7b067b15ae975ee52f91bd674cc667baa09eb04 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Janek=20Warcho=C5=82?= Date: Sat, 9 Aug 2014 21:08:08 +0200 Subject: [PATCH] Grob alignment: get back 2.19.9 behaviour 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 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index ce418e8cf8..53401d3a42 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -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) @@ -576,6 +577,7 @@ 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) @@ -620,6 +622,7 @@ (font-series . bold) (outside-staff-priority . 450) (padding . 0.5) + (parent-alignment-X . #f) (script-priority . 200) (self-alignment-X . #f) (side-axis . ,Y) @@ -766,6 +769,7 @@ (font-encoding . fetaText) (font-size . -2) (padding . 0.2) + (parent-alignment-X . ,CENTER) (self-alignment-X . ,CENTER) (side-axis . ,Y) (staff-padding . 0.25) @@ -832,6 +836,7 @@ (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) @@ -944,6 +949,8 @@ (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) @@ -1087,6 +1094,7 @@ (GridLine . ( (layer . 0) + (parent-alignment-X . ,CENTER) (self-alignment-X . ,CENTER) (stencil . ,ly:grid-line-interface::print) (X-extent . ,ly:grid-line-interface::width) @@ -1512,6 +1520,7 @@ (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) @@ -1534,6 +1543,7 @@ (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) @@ -1737,6 +1747,7 @@ (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) @@ -2131,6 +2142,7 @@ (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) @@ -2149,6 +2161,7 @@ (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) @@ -2171,6 +2184,7 @@ (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) @@ -2349,6 +2363,7 @@ ;; 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) -- 2.39.2