HiDPI canvas: respond to changes in devicePixelRatio
It's possible for
window.devicePixelRatio to change for a variety of reasons, see: https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio#monitoring_screen_resolution_or_zoom_level_changes
Issue #7417 adds support for high DPI drawing, but does not respond to updates. We should perhaps have a
JSignal for this, and automatically trigger a repaint of painted widgets.