Inconsistent alignment of chord name above fretboard

• Mar 20, 2020 - 06:57
Reported version
3.4
Type
Graphical (UI)
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

When placing a fretboard, the chord name is nicely centered above the fretboard. When selecting left alignment, the left of the bounding boxes both fretboard and chord name are correct:
LeftAligned.png

However, the right alignment uses a strange reference:
RightAligned.png

This issue was found when looking #293785: Chord symbols jump when user goes into edit mode and will be solved with the same PR.


Comments

Status PR created fixed

Fixed in branch master, commit 9946fb7c42

_Fix #293785: Fix #302590: Fix #294890 Chord symbols jump when user goes into edit mode

This commit resolves two issues:
Fix #302590 - Inconsistent alignment of chord name above fretboard
Fix #293785 - Chord symbols jump when user goes into edit mode
Fix #294890 - Spacing for center-aligned chords not honored until second layout

When looking into #293785 it was found that placement of Harmonies above a FretDiagram
was not consistent.
o) Align::HCENTER aligns the horizontal centers of bot Harmony and FretDiagram.
o) Align::RIGHT aligns the right edge of the Harmony roughly to the centrer of the FretDiagram.
o) Align::LEFT aligns the left edge of the Harmony to the left edge of the FretDiagram.

So every alignment uses it own reference. This has been corrected first.

The root cause of #302590 was the difference of bounding box between NORMAL and EDIT mode.
And this was caused because of the different formating between NORMAL and EDIT. In EDIT mode
the horizontal alignment was using both different algorithm and reference. Also the height
of the bounding box where different in EDIT and NORMAL mode
To solve this the bounding box while in EDIT mode
1) is aligned exactly are in NORMAL mode
2) has the same height in both EDIT and NORMAL mode._

Fixed in branch master, commit 9946fb7c42

_Fix #293785: Fix #302590: Fix #294890 Chord symbols jump when user goes into edit mode

This commit resolves two issues:
Fix #302590 - Inconsistent alignment of chord name above fretboard
Fix #293785 - Chord symbols jump when user goes into edit mode
Fix #294890 - Spacing for center-aligned chords not honored until second layout

When looking into #293785 it was found that placement of Harmonies above a FretDiagram
was not consistent.
o) Align::HCENTER aligns the horizontal centers of bot Harmony and FretDiagram.
o) Align::RIGHT aligns the right edge of the Harmony roughly to the centrer of the FretDiagram.
o) Align::LEFT aligns the left edge of the Harmony to the left edge of the FretDiagram.

So every alignment uses it own reference. This has been corrected first.

The root cause of #302590 was the difference of bounding box between NORMAL and EDIT mode.
And this was caused because of the different formating between NORMAL and EDIT. In EDIT mode
the horizontal alignment was using both different algorithm and reference. Also the height
of the bounding box where different in EDIT and NORMAL mode
To solve this the bounding box while in EDIT mode
1) is aligned exactly are in NORMAL mode
2) has the same height in both EDIT and NORMAL mode._

Fix version
3.5.0