Discussion:
detect retina or other high-res display?
Jeremy Gray
2014-09-19 15:42:26 UTC
Permalink
Hi all,

I posted a query on stackoverflow
(https://stackoverflow.com/questions/25559139/how-to-detect-mac-retina-display-in-python/25933273)
and Werner suggested I inquire here.

I read that wx python 2.9.5+ supports wx.Window.GetContentScaleFactor (see
http://wxpython.org/Phoenix/docs/html/Window.html#Window.GetContentScaleFactor),
and will return 2.0 for a retina display.

I have a class that inherits from wx.Frame, which inherits from wx.Window.
But GetContentScaleFactor is not there.
wx.version()'3.0.0.0 osx-cocoa (classic)'>>> isinstance(wx.Frame(None), wx.Window)True>>> 'GetContentScaleFactor' in dir(wx.Frame(None))False
Werner said the GetContentScaleFactor is in wxPython Phoenix:
3.0.2.dev77483 , so maybe just did not make it into classic?

Thanks for advice / help getting this feature.

--Jeremy
--
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 wxPython-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-09-19 16:22:04 UTC
Permalink
Post by Jeremy Gray
Hi all,
I posted a query on stackoverflow (
https://stackoverflow.com/questions/25559139/how-to-detect-mac-retina-display-in-python/25933273)
and Werner suggested I inquire here.
I read that wx python 2.9.5+ supports wx.Window.GetContentScaleFactor (see
http://wxpython.org/Phoenix/docs/html/Window.html#Window.GetContentScaleFactor),
and will return 2.0 for a retina display.
I have a class that inherits from wx.Frame, which inherits from wx.Window.
But GetContentScaleFactor is not there.
wx.version()'3.0.0.0 osx-cocoa (classic)'>>> isinstance(wx.Frame(None), wx.Window)True>>> 'GetContentScaleFactor' in dir(wx.Frame(None))False
3.0.2.dev77483 , so maybe just did not make it into classic?
I don't see it here on:
3.0.1.0.b20140707 msw (classic)

This is a preview release of 3.0.1 but no on ever responded to what
differences it would have over the official release (other than 3rd party
widgets, which I'd already been updating myself), so I can't say whether
this is why I lack the function or not.
--
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 wxPython-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...