mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-19 14:38:22 -04:00
Compute the height of the potential text field before rendering the melody pattern so that we can use that information later. Transform the painter so that notes drawn into a [0,1] x [0,1] coordinate system are drawn at the correct position on the pattern widget. Add code that moves the pattern notes smoothly under the text label in case there is not much space, i.e. for narrow patterns. Notes are drawn as filled rectangles with a slightly darker border. Always draw at least an octave of notes onto the pattern, so that patterns with just a single note will not look strange, i.e. that they are not filled completely with the note. If there is additional space to fill it will be rather filled at the top of the pattern so that single notes have a high chance of being drawn below the pattern text. Simplify the drawing of the inner and outer border. Use numeric_limits to initialize the minimum and maximum key. Remove some redundant checks whether the pattern holds notes and decrease the indentation depth by two tabs for most of the code.
24 KiB
24 KiB