]> git.donarmstrong.com Git - lilypond.git/commitdiff
Metronome-mark: align on key-signature too.
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 14 Jun 2010 15:04:15 +0000 (17:04 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 24 Aug 2010 13:24:25 +0000 (15:24 +0200)
lily/metronome-engraver.cc
scm/define-grob-properties.scm
scm/define-grobs.scm

index db6c66df01b8216f8a5e7d67afd76634edf1a4e2..d71452e286bf067eb29cef184b638ced6f2eaa53 100644 (file)
@@ -74,10 +74,12 @@ void
 Metronome_mark_engraver::acknowledge_break_aligned (Grob_info info)
 {
   Grob *g = info.grob ();
+
   if (text_
       && !support_
-      && (g->get_property_data ("break-align-symbol")
-         == text_->get_property_data ("break-align-symbol")))
+      && scm_member (g->get_property_data ("break-align-symbol"),
+                    text_->get_property_data ("break-align-symbols"))
+      != SCM_BOOL_F)
     {
       support_ = g;
       text_->set_parent (g, X_AXIS);
index 59b50a8b9eae3166df976dc9d489dd02eb50a164..d4ee62b815053ad67a0a5a1e68e2721f17f66608 100644 (file)
@@ -607,6 +607,8 @@ staff is crucial for @var{padding}).
      (no-alignment ,boolean? "If set, don't place this grob in a
 @code{VerticalAlignment}; rather, place it using its own
 @code{Y-offset} callback.")
+     (non-break-align-symbols ,list? "A list of symbols that determine
+which NON-break-aligned grobs to align this to.")
      (no-ledgers ,boolean? "If set, don't draw ledger lines on this
 object.")
      (no-stem-extend ,boolean? "If set, notes with ledger lines do not
index d4e3863c03692cdb9001d11759b90d96adb36b52..7f2c554bea667117a852b81762311a0e02948b36 100644 (file)
                               key-cancellation
                               key-signature
                               time-signature
+                              metronome-mark
                               custos)
 
                              ;; unbroken
                               key-cancellation
                               key-signature
                               time-signature
+                              metronome-mark
                               custos)
 
                              ;; begin of line
                               key-signature
                               staff-bar
                               time-signature
+                              metronome-mark
                               custos)))
        (non-musical . #t)
        (positioning-done . ,ly:break-alignment-interface::calc-positioning-done)
                          (list ly:break-alignable-interface::self-align-callback))
                        ,(ly:make-simple-closure
                          (list ly:self-alignment-interface::x-aligned-on-self)))))
-       (self-alignment-X . -1)
-       (break-align-symbol . time-signature)
-       (break-align-symbols . (time-signature))
+       (self-alignment-X . ,LEFT)
+       (break-align-symbol . metronome-mark)
+       (break-align-symbols . (key-signature time-signature metronome-mark))
        (non-break-align-symbols . (MultiMeasureRest))
        (meta . ((class . Item)
                 (interfaces . (font-interface