Open traverseda opened 5 years ago
Hi, yes I detect the Mac and reverse scroll direction - the code should not affect linux? e.g.
if event.GetWheelAxis() == wx.MOUSE_WHEEL_VERTICAL:
v = event.GetWheelRotation()
if "wxMac" in wx.PlatformInfo: # natural scrolling - should get from system
v = -v
self.Scroll(self.GetScrollPos(wx.HORIZONTAL),
self.GetScrollPos(wx.VERTICAL) + v)
else:
self.Scroll(self.GetScrollPos(wx.HORIZONTAL) + event.GetWheelRotation(),
self.GetScrollPos(wx.VERTICAL))
see line 931 in https://github.com/abulka/pynsource/blob/master/src/gui/uml_canvas.py
Huh, I'm definitely getting natural scroll, but only in this one program.
Platform info is as follow:
('__WXGTK__', 'wxGTK',
'unicode', 'unicode-wchar',
'gtk3', 'wx-assertions-on',
'phoenix', 'wxWidgets 3.0.4',
'sip-4.19.16',
'build-type: release')
Getting it both for touch pad and scroll wheel.
Yeah, I have no idea what could be causing that.
For now, try changing line 933 of https://github.com/abulka/pynsource/blob/master/src/gui/uml_canvas.py to
if "wxMac" in wx.PlatformInfo or "wxGTK" in wx.PlatformInfo:
Scroll is backwards under my linux system. Looks like you manually reversed the direction of scroll?