- removed patch to fix scaling on HIDPI displays since now the fix is implemented in VisPy v0.8.1
- modified a patch for VisPy Infinite Line Visual that set the line width, in order to make it compliant with newer versions of OpenGL
This commit is contained in:
@@ -11,6 +11,8 @@ CHANGELOG for FlatCAM beta
|
||||
|
||||
- fixed the reconnection of the mouse events when canceling setting the origin
|
||||
- disabled the selection of a Graphic Engine until matplotlib will have support for PyQt6 framework
|
||||
- removed patch to fix scaling on HIDPI displays since now the fix is implemented in VisPy v0.8.1
|
||||
- modified a patch for VisPy Infinite Line Visual that set the line width, in order to make it compliant with newer versions of OpenGL
|
||||
|
||||
29.08.2021
|
||||
|
||||
|
||||
@@ -61,19 +61,11 @@ def apply_patches():
|
||||
"""This method is called immediately before each draw.
|
||||
The *view* argument indicates which view is about to be drawn.
|
||||
"""
|
||||
GL = None
|
||||
from vispy.app._default_app import default_app
|
||||
|
||||
if default_app is not None and \
|
||||
default_app.backend_name != 'ipynb_webgl':
|
||||
try:
|
||||
import OpenGL.GL as GL
|
||||
except Exception: # can be other than ImportError sometimes
|
||||
pass
|
||||
|
||||
if GL:
|
||||
GL.glDisable(GL.GL_LINE_SMOOTH)
|
||||
GL.glLineWidth(1.5)
|
||||
self.update_gl_state(line_smooth=False)
|
||||
px_scale = self.transforms.pixel_scale
|
||||
width = px_scale * 1.5
|
||||
self.update_gl_state(line_width=max(width, 1.0))
|
||||
|
||||
if self._changed['pos']:
|
||||
self.pos_buf.set_data(self._pos)
|
||||
@@ -140,19 +132,3 @@ def apply_patches():
|
||||
return NotImplementedError
|
||||
|
||||
Ticker._get_tick_frac_labels = _get_tick_frac_labels
|
||||
|
||||
def _resizeGL(self, w, h):
|
||||
if self._vispy_canvas is None:
|
||||
return
|
||||
if hasattr(self, 'devicePixelRatio'):
|
||||
# We take into account devicePixelRatio, which is non-unity on
|
||||
# e.g HiDPI displays.
|
||||
# self.devicePixelRatio() is a float and should have been in Qt5 according to the documentation
|
||||
ratio = self.devicePixelRatio()
|
||||
w = int(w * ratio)
|
||||
h = int(h * ratio)
|
||||
self._vispy_set_physical_size(w, h)
|
||||
self._vispy_canvas.events.resize(size=(self.width(), self.height()),
|
||||
physical_size=(w, h))
|
||||
|
||||
CanvasBackendDesktop.resizeGL = _resizeGL
|
||||
|
||||
@@ -29,7 +29,7 @@ pyserial>=3.4
|
||||
pikepdf>=2.0
|
||||
pywin32>2.0
|
||||
pyqt6>=6.1.0
|
||||
vispy>=0.8.0
|
||||
vispy>=0.8.1
|
||||
rasterio
|
||||
foronoi>=1.0.3
|
||||
networkx
|
||||
Reference in New Issue
Block a user