Skip to content

Split out TrillPitchParentheses from TrillPitchGroup

Previously, TrillPitchGroup was not only responsible for holding the note head and, when relevant, accidental, but also for printing the parentheses around them. Now, the parentheses are printed by a separate grob, TrillPitchParentheses, added to the TrillPitchGroup. This has several benefits:

  • Making the code simpler to understand. TrillPitchGroup was X parent to TrillPitchHead, but TrillPitchHead was Y parent to TrillPitchGroup, which is a bit unusual. Now, the Y parent of TrillPitchGroup is VerticalAxisGroup.

  • It should be more natural for a user to override, say, font-size on something called TrillPitchParentheses than TrillPitchGroup.

  • The logic for positioning the parentheses vertically was different from regular parentheses, never shifting the stencil at all. Now, the same mechanism is used, centering the parentheses on the note head, which has the accidental as friend. This will simplify later enhancements to parentheses. (Note that this doesn't result in any rendering difference since the glyph noteheads.s2 has a vertical extent that is symmetric around 0.)

  • This allows to remove a horrible check from separation-item.cc and remove the note-head-interface from TrillPitchGroup -- which was an aberration.

Merge request reports