Question about bitmaps and retina / HiDPI
[email protected] Fri, 18 May 2018 19:34:03 -0700 (PDT)
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi there, I have a question concerning using high-resolution bitmaps with macOS and retina screens. It seems there is support for this in wxWidgets, somewhat automagically, by putting a regular resolution e.g. "image.png" source file and also a 2x resolution e.g. "[email protected]" source file next to it in the same directory. The code seems to indicate that if wxWidgets finds a retina screen and a version of the png file with @2x in the filename, then it will automatically use the @2x higher-resolution version of the image. https://github.com/wxWidgets/wxWidgets/blob/master/src/osx/core/bitmap.cpp#L1143 I can't get this to work with wxPython, even though it seems the above wxWidgets code is in the version that wxPython uses. Question 1: Should this work in wxPython? Is there something I'm not doing right? Question 2: I notice that the wxWidgets code is wrapped in an #if wxUSE_IMAGE, and furthermore that wxPython's build_wxwidgets.py doesn't seem to use wxUSE_IMAGE. Is this why I can't get it to work with wxPython? Is there a reason not to use the option wxUSE_IMAGE? There was another post in wxpython-users about this too: https://groups.google.com/forum/#!topic/wxpython-users/EV5rOSohRCE thanks much for the info, Matt -- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.