1
我读到wx python 2.9.5+支持wx.Window.GetContentScaleFactor(请参阅http://wxpython.org/Phoenix/docs/html/Window.html#Window.GetContentScaleFactor),并将返回视网膜显示2.0。如何在python中检测Mac视网膜显示?
我有一个继承自wx.Frame的类,它继承自wx.Window。但GetContentScaleFactor不在那里。显然在wxPerl中有这样的错误(https://rt.cpan.org/Public/Bug/Display.html?id=96136) - 类似于wxPython中的错误?
任何想法?
编辑:更多的信息:
>>> wx.version()
'3.0.0.0 osx-cocoa (classic)'
>>> isinstance(wx.Frame(None), wx.Window)
True
>>> 'GetContentScaleFactor' in dir(wx.Frame(None))
False
我可能完全偏离轨道,因为我多年没有使用wx,但[类层次](http://wxpython.org/Phoenix/docs/html/Frame.html#class-hierarchy-class-层次结构)表示Frame从Window继承,所以你的框架应该只有GetContentScaleFactor方法。 – 2014-08-28 22:52:38
谢谢安德鲁 - 我已经试过,也看过.GetHandle()有点 – jrgray 2014-08-29 02:06:24
你真的需要知道你是在Mac视网膜显示器上运行,还是你真的在乎你是否在任何高分辨率显示? – 2014-09-19 14:25:21