Top half of element is cut in the miniature cursor when being dragged
S4 - Minor
When clicking on elements in the Palettes, the cursor becomes a miniature preview of the element we are dragging into a score. Unfortunately, many of those seems to be visually broken, the upper half of many of these elements is cut. In the attached image, you will see how the cursor looks like for a crescendo hairpin and for the 22a. line. This happens to many other miniature cursors too.
Discussion link: https://musescore.org/en/node/289996#comment-923394
I'm looking into this now. The issue has to do with how these lines elements are vertically-centered when laid out. After the e->layout() call in
the boundary box for the mf< looks like:
Which is has y center of 0. Seems that Y center should be 31.625 instead....
Seems to affect all lines except voltas
Typo in issue title.
PR created, please review: https://github.com/musescore/MuseScore/pull/5193
Fixed in branch master, commit 1a79a67cb0
_fix #290058 translate palette drag painter coords
If the default layout of a palette element resulted in a boundary box with negative x & y coordinates for the top-left corner, the changed line of this commit would attempt to ensure that the entire element's pixelmap would be rendered in positive coordinate space only by offseting its position according to the top-left corner coordinates. Unfortunately, that code don't seem to work, since vertically-centered elements like hairpins (which have a negative y coordinate for the top of its boundary box) only displayed the elements bottom-half when dragged from palette.
This fix uses alternate code which I think more properly does what that line intended to do, using Qt's QPainter translate function instead of e->setPos() to compensate for layout's adjustment of the element's position._
Fixed in branch master, commit e7ad592eab
_Merge pull request #5193 from ericfont/290058-translatePainter
fix #290058 translate palette drag painter coords_
Automatically closed -- issue fixed for 2 weeks with no activity.