musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.33k stars 2.66k forks source link

Decouple `EngravingItem` icon engine logic from palette module #25386

Closed mathesoncalum closed 1 week ago

mathesoncalum commented 2 weeks ago

Currently, our logic for painting engraving items in the UI is completely contained within the palette module. This is a problem for the new Percussion Panel, where we're going to build a "notation preview" completely outwith the pallete module.

To resolve this, this PR introduces an EngravingItemPreviewPainter class to the engraving module and moves the existing logic to engravingitempreviewpainter.cpp, allowing us to reuse the painting logic wherever we need it.

zacjansheski commented 1 week ago

Tested on MacOS 14, Windows 11, Ubuntu 22.04.3. Approved