Would it be possible to implement scale factor handling in CallOutBox like it is done in PopupMenu if there are no parentComponent ?
Still it would require some optional parameter to the init component it originate from while still be on the desktop
a myBox.setTransform(juce::AffineTransform::scale(getApproximateScaleFactor(this)));
where this is the component it originate from is not enough.
getApproximateScaleFactor impl from PopupMenu for example.
Unlike PopupMenu there’s no concept of a targetComponent for CallOutBox (or DialogWindow either really) - you just pass it the area you want it to target. Would it make more sense if the CallOutBox scaled with the transform of its content? Then you would do something like this when launching:
Sorry, yes I meant that it isn’t implemented at the moment but it’s something that we could do and might make more sense than adding a targetComponent or similar like in PopupMenu. What I was asking was whether that would work for your use case?
Trying to set setTransform(juce::AffineTransform::scale(juce::Component::getApproximateScaleFactorForComponent( this )));
on the owned component asserts
and settings the same code on the DialogWindow itself lead to some weird mouse handling issue. (either after launchAsync or after create and before enterModalState)
To scale a DialogBox appropriately for a plugin, you should set LaunchOptions::componentToCentreAround to your plugin editor, or a child of your editor.
Please let me know if you run into any issues with this change.