I want to know if my app/component is on a retina display or not (say to paint things differently for instance).
But the user can have a main retina display, plus an external non-retina display, and move the app between them.
Is there any smart trick, a callback or something that I can use to be told when the display I’m on is changing?
I could use a timer, and regularly check the current one with something like that :
const double scale = Desktop::getInstance().getDisplays().getDisplayContaining (myComponent.getScreenBounds().getCentre()).scale; const bool isRetina = scale > 1.;
But there must be a better option?