X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fseparation-item.cc;h=2c48a347713fd15751621bbc29e1c8dc25035ae9;hb=637eff7ba745bbeb96d347d1798615529cea9e5f;hp=8a777a0df9aadf51563972e725b7ff022fc77953;hpb=94189ec2b8da6d7e89dc619c646a927adead9b19;p=lilypond.git diff --git a/lily/separation-item.cc b/lily/separation-item.cc index 8a777a0df9..2c48a34771 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -34,9 +34,9 @@ Separation_item::my_width (Grob *me) Paper_column * pc = item->column_l (); Interval w; - for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = gh_cdr (s)) + for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = ly_cdr (s)) { - SCM elt = gh_car (s); + SCM elt = ly_car (s); if (!unsmob_grob (elt)) continue; @@ -44,7 +44,7 @@ Separation_item::my_width (Grob *me) if (pc != il->column_l ()) { /* this shouldn't happen, but let's continue anyway. */ - programming_error (_("Separation_item: I've been drinking too much")); + programming_error (_ ("Separation_item: I've been drinking too much")); continue; /*UGH UGH*/ } @@ -56,10 +56,18 @@ Separation_item::my_width (Grob *me) Interval iv (il->extent (pc, X_AXIS)); if (!iv.empty_b ()) { - w.unite (iv); + w.unite (iv); } } + SCM pad = me->get_grob_property ("padding"); + + if (gh_number_p (pad)) + { + w[RIGHT] += gh_scm2double (pad)/2; + w[LEFT] -= gh_scm2double (pad)/2; + } + return w; // add this->offset_ ? this-> relative_coordinate ()? }