FretDiagram : make the vertical offset a user adjustable parameter

• Jan 30, 2014 - 16:59
S5 - Suggestion

In playing with the fretboard diagrams, I've wanted to move them closer to the staff. When we implement #24349: Set the size of fretboard offset text as part of the style, it would be nice to also provide a preference for this distance.

The target is in FretDiagram::layout() :

setPos(-_spatium, -h -_spatium);

In my local copy, I've set it to:

setPos(-_spatium, -h);

Making this a preference would be ideal.


I just tried out Jojo's branch and the preferences work as expected. I'm able to adjust the vertical offset for the fret diagrams using the style editor.

Some UI nits for the Style tab:

1. since both chord symbols and fretboard diagrams are now included in this tab, the section headers are ambiguous. If the Chord Symbol entries could all be grouped instead of having 6 separate groups, that would help. Otherwise, I think they should include a prefix to delineate "Chord Symbol" controls from "Fretboard" controls.

2. "Capo" should probably be last in the list and not between two sections that deal with size / position

3. the "Distance to fretboard diagram" parameter seems to do nothing. It should be removed until it works.

4. the value the user enters for offsets should be standardized. In the case of chord symbol position, it is the relative position (i.e., negative to move up) but for fretboard diagrams it is the absolute distance (i.e., positive to move up). I prefer specifying the magnitude as in the fretboard diagram. That is, let the program figure out the most likely direction (in this case "up") and I'll just specify how much. If I want to go against the grain and move it opposite of the logical direction, then it makes sense (from a user perspective) for the number to go negative.

5. the label "Distance staff to fretboard diagram" could use some rewording. Since the section is labeled "Fretboard diagram" this could simply be "default vertical position" as in the chord symbol above. If that label is not desirable, I'd suggest that the same text be used for chord symbols and fretboard diagrams.

6. the label "Fret offset number size" should be "Fret offset font size".

7. maybe the offset number size and position could be reorganized to look like this:

Fret offset       size: _______              position: ( ) L    (*) R