##// END OF EJS Templates
BUG: Scrolling pager in vsplit on Mac OSX tears....
Prabhu Ramachandran -
Show More
@@ -172,6 +172,13 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):'
172 QtGui.QWidget.__init__(self, parent)
172 QtGui.QWidget.__init__(self, parent)
173 LoggingConfigurable.__init__(self, **kw)
173 LoggingConfigurable.__init__(self, **kw)
174
174
175 # While scrolling the pager on Mac OS X, it tears badly. The
176 # NativeGesture is platform and perhaps build-specific hence
177 # we take adequate precautions here.
178 self._pager_scroll_events = [QtCore.QEvent.Wheel]
179 if hasattr(QtCore.QEvent, 'NativeGesture'):
180 self._pager_scroll_events.append(QtCore.QEvent.NativeGesture)
181
175 # Create the layout and underlying text widget.
182 # Create the layout and underlying text widget.
176 layout = QtGui.QStackedLayout(self)
183 layout = QtGui.QStackedLayout(self)
177 layout.setContentsMargins(0, 0, 0, 0)
184 layout.setContentsMargins(0, 0, 0, 0)
@@ -364,17 +371,11 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):'
364 QtGui.qApp.sendEvent(obj, QtGui.QDragLeaveEvent())
371 QtGui.qApp.sendEvent(obj, QtGui.QDragLeaveEvent())
365 return True
372 return True
366
373
367 # Handle scrolling of the vsplit pager. This hack attempts to solve the
374 # Handle scrolling of the vsplit pager. This hack attempts to solve
368 # problem of tearing of the pager window's help text on Mac OS X. This
375 # problems with tearing of the help text inside the pager window. This
369 # happens with PySide and PyQt. This fix isn't perfect but makes the
376 # happens only on Mac OS X with both PySide and PyQt. This fix isn't
370 # pager more usable.
377 # perfect but makes the pager more usable.
371
378 elif etype in self._pager_scroll_events and \
372 # FIXME: this line, on qt 4.8.5, crashes b/c NativeGesture is not
373 # available. Disabling for now, until we sort out a cleaner solution.
374 # See https://github.com/ipython/ipython/pull/1150 for details.
375 #elif etype in [QtCore.QEvent.Wheel, QtCore.QEvent.NativeGesture] and \
376
377 elif etype == QtCore.QEvent.Wheel and \
378 obj == self._page_control:
379 obj == self._page_control:
379 self._page_control.repaint()
380 self._page_control.repaint()
380 return True
381 return True
General Comments 0
You need to be logged in to leave comments. Login now