From: Mats Bengtsson <mats.bengtsson@s3.kth.se>
Date: Mon, 16 May 2005 11:46:54 +0000 (+0000)
Subject: 	* lily/horizontal-bracket.cc (print): Take care of the direction
X-Git-Tag: release/2.5.25~24
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f9b2c59dd878330905eef9d6c1c7b3729b44aba7;p=lilypond.git

	* lily/horizontal-bracket.cc (print): Take care of the direction
	property so brackets above the stave point downwards.

	* scm/define-grobs.scm (all-grob-descriptions): Set staff-padding
	for HorizontalBracket so it doesn't end up within the stave.
---

diff --git a/ChangeLog b/ChangeLog
index f506874bb6..b1eeae4995 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-05-16  Mats Bengtsson  <mabe@drongo.s3.kth.se>
+
+	* lily/horizontal-bracket.cc (print): Take care of the direction
+	property so brackets above the stave point downwards. 
+
+	* scm/define-grobs.scm (all-grob-descriptions): Set staff-padding
+	for HorizontalBracket so it doesn't end up within the stave.
+
 2005-05-16  Jan Nieuwenhuizen  <janneke@gnu.org>
 
 	* lily/GNUmakefile (default): Typo.
diff --git a/lily/horizontal-bracket.cc b/lily/horizontal-bracket.cc
index 654a1e0015..c4b598761a 100644
--- a/lily/horizontal-bracket.cc
+++ b/lily/horizontal-bracket.cc
@@ -57,6 +57,10 @@ Horizontal_bracket::print (SCM smob)
   Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
 						  Interval (0, 0));
 
+  // Make sure that it points in the correct direction:
+  Real dir = get_grob_direction (me);
+  scale_drul (&edge_height, -dir);
+
   Interval empty;
   Stencil b
     = Tuplet_bracket::make_bracket (me, Y_AXIS, Offset (ext.length (), 0),
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index 04818dcd15..2ba4eabd7f 100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -537,6 +537,7 @@
 	(print-function . ,Horizontal_bracket::print)
 	(Y-offset-callbacks . (,Side_position_interface::aligned_side))
 	(padding . 0.2)
+	(staff-padding . 0.2)
 	(direction . -1)
 	(bracket-flare . (0.5 . 0.5))
 	(meta . ((interfaces . (horizontal-bracket-interface