#include "wx/log.h"
#include "wx/textctrl.h"
#include "wx/combobox.h"
+ #include "wx/radiobut.h"
#endif
#ifdef __WXMAC__
if ( fabs(deltaX) > fabs(deltaY) )
{
+ // wx conventions for horizontal are inverted from vertical (originating from native msw behavior)
+ // right and up are positive values, left and down are negative values, while on OSX right and down
+ // are negative and left and up are positive.
wxevent.m_wheelAxis = wxMOUSE_WHEEL_HORIZONTAL;
- wxevent.m_wheelRotation = (int)deltaX;
+ wxevent.m_wheelRotation = -(int)deltaX;
}
else
{
[m_osxView setHidden:(visible ? NO:YES)];
}
+double wxWidgetCocoaImpl::GetContentScaleFactor() const
+{
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+ NSWindow* tlw = [m_osxView window];
+ if ( [ tlw respondsToSelector:@selector(backingScaleFactor) ] )
+ return [tlw backingScaleFactor];
+ else
+#endif
+ return 1.0;
+}
+
// ----------------------------------------------------------------------------
// window animation stuff
// ----------------------------------------------------------------------------