]> git.donarmstrong.com Git - lilypond.git/commitdiff
Revert "outside-staff-padding: just one pad; issue 2910"
authorKeith OHara <k-ohara5a5a@oco.net>
Wed, 3 Jul 2013 03:44:22 +0000 (20:44 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Wed, 3 Jul 2013 03:44:22 +0000 (20:44 -0700)
This reverts commit 8d96001e14317b93c68a749c2ec270b3738e7ad9.

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

index 9389236d1feb6b366a1b2cba7e42088555e9004b..0d786c3a2959aa201470f761c27ee3cd6a98645d 100644 (file)
@@ -672,17 +672,15 @@ 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]);
 
-      Interval collision;
-      // We need to push elt by at least this much to be outside v_other.
-      collision[dir] = ((*v_skyline)[-dir].distance (v_other[dir], horizon_pad)
-                        + padding) * dir;
-      // We need to pull elt by at least this much to be inside v_other.
-      collision[-dir] = ((*v_skyline)[dir].distance (v_other[-dir], horizon_pad)
-                         + other_padding[j]) * -dir;
+      // 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;
+      // We need to push elt down by at least this much to be below v_other.
+      Real down = (*v_skyline)[UP].distance (v_other[DOWN], horizon_pad) + pad;
 
-      forbidden_intervals.push_back (collision);
+      forbidden_intervals.push_back (Interval (-down, up));
     }
 
   Interval_set allowed_shifts
@@ -764,8 +762,7 @@ add_grobs_of_one_priority (Grob *me,
         {
           Grob *elt = elements[i];
           Real padding
-            = robust_scm2double (elt->get_property ("outside-staff-padding"),
-                                 Axis_group_interface::get_default_outside_staff_padding ());
+            = robust_scm2double (elt->get_property ("outside-staff-padding"), 0.25);
           Real horizon_padding
             = robust_scm2double (elt->get_property ("outside-staff-horizontal-padding"), 0.0);
           Interval x_extent = elt->extent (x_common, X_AXIS);
index 04f20c17ec4be1505c4ebd29df5a12e4fb2081bb..ee71f903c71ff164acb85566e84b5512398c7bff 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)