#18839: Implement wxEVT_DPI_CHANGED for wxOSX
--------------------------+------------------------
Reporter: vadz | Owner: csomor
Type: enhancement | Status: accepted
Priority: normal | Milestone:
Component: wxOSX | Version: dev-latest
Resolution: | Keywords: HiDPI
Blocked By: | Blocking:
Patch: 0 |
--------------------------+------------------------
Comment (by vadz):
Thanks for looking at this!
DPI values should be just the real DPI before and after the change. E.g.
when moving from "normal" to "high DPI" display, the old one would be 72
and the new one 144. It's a bit annoying that normal value under Mac is 72
and not 96 as everywhere else, but I think it's mostly/only the ratio of
them which counts. In fact, as I think I've already mentioned in one of
our discussions with Maarten before, I think we should add
`wxDPIChangedEvent::Rescale()` method using `wxMulDivInt32()` to adjust
the value used with the old DPI to the new one.
It's true that under Mac we don't have to do manual relayout (see #18649),
but I think it's still important to get this event for any kind of
dynamically generated content, e.g. AUI art provider icons would need to
be recreated when DPI changes etc.
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/18839#comment:3>