From 55c44937d1ce8324bb259095e5d404f44013b99e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 14 Jun 2010 17:04:15 +0200 Subject: [PATCH] Metronome-mark: align on key-signature too. --- lily/metronome-engraver.cc | 6 ++++-- scm/define-grob-properties.scm | 2 ++ scm/define-grobs.scm | 9 ++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc index db6c66df01..d71452e286 100644 --- a/lily/metronome-engraver.cc +++ b/lily/metronome-engraver.cc @@ -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); diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 59b50a8b9e..d4ee62b815 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -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 diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index d4e3863c03..7f2c554bea 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -430,6 +430,7 @@ key-cancellation key-signature time-signature + metronome-mark custos) ;; unbroken @@ -442,6 +443,7 @@ key-cancellation key-signature time-signature + metronome-mark custos) ;; begin of line @@ -454,6 +456,7 @@ key-signature staff-bar time-signature + metronome-mark custos))) (non-musical . #t) (positioning-done . ,ly:break-alignment-interface::calc-positioning-done) @@ -1169,9 +1172,9 @@ (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 -- 2.39.2