JUCE 6 (not the very latest tip). We have a scalable plugin and scale the child- component that contains all the UI with the following code according to the plugin size:
The position of the transparent default drag image has an offset when starting to drag the component when we make the plugin smaller or bigger where the scale factor is not 1:
Any help or fixes are welcome. Thanks.
Edit: It selects the right target. It is the semi-transparent drag image that is in the wrong position.
Please can someone from the JUCE team have a look at this @ed95 ?
Steps to reproduce:
Scale the component that contains the drag and drop source and target.
Drag the component
→ the drag image is not at the right position when the component is scaled
The problem is that the juce_DragAndDropContainer.cpp in startDragging() mixes the mouse position (getLocalPoint()) with the unscaled component bounds. That ends up in the wrong calculation of the drag image position.
The 6.1 release was already out before this fix, and then it was held back a bit to make sure we are not introducing regressions before 6.1.1 and 6.1.2.
The fix is now out on develop at commit 823bfb0 and will be part of the next release on the master branch.