]> git.donarmstrong.com Git - lilypond.git/commitdiff
outside-staff-padding: just one pad; issue 2910
authorKeith OHara <k-ohara5a5a@oco.net>
Mon, 26 Aug 2013 04:19:48 +0000 (21:19 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Wed, 4 Sep 2013 21:19:38 +0000 (14:19 -0700)
When two grobs using 'outside-staff-padding are placed against each
other, use the larger of the two grobs values of 'outside-staff-padding.

lily/axis-group-interface.cc
scm/define-grobs.scm

index 7579ed8c1a3a93cebf9977df14b0d0dc237638a2..819a32d6f4245169169729faf5fa6e09b1e4fe4b 100644 (file)
@@ -672,8 +672,8 @@ avoid_outside_staff_collisions (Grob *elt,
   for (vsize j = 0; j < other_v_skylines.size (); j++)
     {
       Skyline_pair const &v_other = other_v_skylines[j];
-      Real pad = (padding + other_padding[j]);
-      Real horizon_pad = (horizon_padding + other_horizon_padding[j]);
+      Real pad = max (padding, other_padding[j]);
+      Real horizon_pad = max (horizon_padding, other_horizon_padding[j]);
 
       // We need to push elt up by at least this much to be above v_other.
       Real up = (*v_skyline)[DOWN].distance (v_other[UP], horizon_pad) + pad;
@@ -762,7 +762,9 @@ add_grobs_of_one_priority (Grob *me,
         {
           Grob *elt = elements[i];
           Real padding
-            = robust_scm2double (elt->get_property ("outside-staff-padding"), 0.25);
+            = robust_scm2double (elt->get_property ("outside-staff-padding"),
+                                 Axis_group_interface
+                                 ::get_default_outside_staff_padding ());
           Real horizon_padding
             = robust_scm2double (elt->get_property ("outside-staff-horizontal-padding"), 0.0);
           Interval x_extent = elt->extent (x_common, X_AXIS);
index af5f4fe36b49147d29b590291009b82f10f8e0df..184d086b304216b0fb21d977a83ed5d3728c4ec1 100644 (file)
         (direction . ,DOWN)
         (minimum-space . 1.2)
         (outside-staff-priority . 250)
-        (outside-staff-padding . 0.6)
         (padding . 0.6)
         (side-axis . ,Y)
         (slur-padding . 0.3)
         (font-encoding . fetaText)
         (font-size . -2)
         (outside-staff-horizontal-padding . 0.5)
-        (outside-staff-padding . 0.5)
         (outside-staff-priority . 750)
         (self-alignment-X . ,CENTER)
         (side-axis . ,Y)
         (extra-spacing-width . (+inf.0 . -inf.0))
         (font-size . 2)
         (non-musical . #t)
-        (outside-staff-horizontal-padding . 0.12)
+        (outside-staff-horizontal-padding . 0.2)
         (outside-staff-priority . 1500)
         (padding . 0.8)
         (self-alignment-X . ,CENTER)
         (cross-staff . ,script-or-side-position-cross-staff)
         (direction . ,DOWN)
         (extra-spacing-width . (+inf.0 . -inf.0))
-        (outside-staff-horizontal-padding . 0.12)
+        (outside-staff-horizontal-padding . 0.2)
         (outside-staff-priority . 450)
 
         ;; sync with Fingering ?