lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

page-layout: nonstaff lines, follow-up commit 7a60a342 (issue 21050043)


From: k-ohara5a5a
Subject: page-layout: nonstaff lines, follow-up commit 7a60a342 (issue 21050043)
Date: Sat, 02 Nov 2013 22:29:05 +0000

Reviewers: ,

Message:
Make the code for add_prob() consistent with that for add_system()


https://codereview.appspot.com/21050043/diff/20001/lily/page-layout-problem.cc
File lily/page-layout-problem.cc (right):

https://codereview.appspot.com/21050043/diff/20001/lily/page-layout-problem.cc#newcode666
lily/page-layout-problem.cc:666: if (sky)
This case, skyline-spacing of things that are not systems and outside
any system, does not happen with LilyPond defaults.
If I force skyline-spacing of markup, I need the baseline of the markup
even with the lowest line of Lyrics or other 'loose lines' above, to be
consistent with the rule enforced in distribute_loose_lines() that
Lyrics of a lower staff cannot be any higher than Lyrics of a higher
staff, even if skylines would allow interleaving.

Description:
page-layout: nonstaff lines, follow-up commit 7a60a342

Please review this at https://codereview.appspot.com/21050043/

Affected files (+10, -4 lines):
  M input/regression/page-spacing-nonstaff-lines-and-markup.ly
  M lily/page-layout-problem.cc


Index: input/regression/page-spacing-nonstaff-lines-and-markup.ly
diff --git a/input/regression/page-spacing-nonstaff-lines-and-markup.ly b/input/regression/page-spacing-nonstaff-lines-and-markup.ly index 1e26dfe31749b194789f76703c2e78277c5a8c4a..1f7f6ef3508a80bdbac9657498788dad82258d37 100644
--- a/input/regression/page-spacing-nonstaff-lines-and-markup.ly
+++ b/input/regression/page-spacing-nonstaff-lines-and-markup.ly
@@ -16,6 +16,12 @@ the page layout engine."
      \new Lyrics \lyricsto "asdf" \lyricmode { a b c d }
   >>
   }
-  \markup "blah blah blah"
+  \markup "next song"
+  \score {
+    <<
+      \new Lyrics \lyricmode {la1 la }
+      \new Staff \new Voice { a'1 a'1 }
+  >>
+  }
 }

Index: lily/page-layout-problem.cc
diff --git a/lily/page-layout-problem.cc b/lily/page-layout-problem.cc
index 95635140bf1d223b0e68a659310654d91c08e7ee..5885a661359b6accd9055228bd11b10cf8f19f88 100644
--- a/lily/page-layout-problem.cc
+++ b/lily/page-layout-problem.cc
@@ -652,8 +652,6 @@ Page_layout_problem::append_system (System *sys, Spring const &spring, Real inde
                            : 0;

   // Corner case: there was only one staff, and it wasn't spaceable.
-  // Mark it spaceable, because we do not allow non-spaceable staves
-  // to be at the top or bottom of a system.
   if (!found_spaceable_staff && elts.size ())
     mark_as_spaceable (elts[0]);
 }
@@ -667,7 +665,8 @@ Page_layout_problem::append_prob (Prob *prob, Spring const &spring, Real padding

   if (sky)
     {
-      minimum_distance = (*sky)[UP].distance (bottom_skyline_);
+      minimum_distance = max ((*sky)[UP].distance (bottom_skyline_),
+                              bottom_loose_baseline_);
       bottom_skyline_ = (*sky)[DOWN];
     }
   else if (Stencil *sten = unsmob_stencil (prob->get_property ("stencil")))
@@ -678,6 +677,7 @@ Page_layout_problem::append_prob (Prob *prob, Spring const &spring, Real padding
       bottom_skyline_.clear ();
       bottom_skyline_.set_minimum_height (iv[DOWN]);
     }
+  bottom_loose_baseline_ = 0.0;

   Spring spring_copy = spring;
   if (tight_spacing)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]