Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 23705cb

Browse filesBrowse files
committed
Suggestions from Robin
1 parent 62281a9 commit 23705cb
Copy full SHA for 23705cb

File tree

Expand file treeCollapse file tree

1 file changed

+8
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-4
lines changed

‎lib/matplotlib/backends/backend_wx.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_wx.py
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,11 @@ def __init__(self, canvas):
15741574
self._idle = True
15751575
self.statbar = None
15761576
self.prevZoomRect = None
1577-
self.RetinaFix = 'wxMac' in wx.PlatformInfo
1577+
# for now, use alternate zoom-rectangle drawing on all
1578+
# Macs. N.B. In future versions of wx it may be possible to
1579+
# detect Retina displays with window.GetContentScaleFactor()
1580+
# and/or dc.GetContentScaleFactor()
1581+
self.retinaFix = 'wxMac' in wx.PlatformInfo
15781582

15791583
def get_canvas(self, frame, fig):
15801584
return FigureCanvasWx(frame, -1, fig)
@@ -1676,7 +1680,7 @@ def dynamic_update(self):
16761680

16771681
def press(self, event):
16781682
if self._active == 'ZOOM':
1679-
if not self.RetinaFix:
1683+
if not self.retinaFix:
16801684
self.wxoverlay = wx.Overlay()
16811685
else:
16821686
self.savedRetinaImage = self.canvas.copy_from_bbox(
@@ -1688,7 +1692,7 @@ def release(self, event):
16881692
if self._active == 'ZOOM':
16891693
# When the mouse is released we reset the overlay and it
16901694
# restores the former content to the window.
1691-
if not self.RetinaFix:
1695+
if not self.retinaFix:
16921696
self.wxoverlay.Reset()
16931697
del self.wxoverlay
16941698
else:
@@ -1698,7 +1702,7 @@ def release(self, event):
16981702
self.prevZoomRect = None
16991703

17001704
def draw_rubberband(self, event, x0, y0, x1, y1):
1701-
if self.RetinaFix: # On Macs, use the following code
1705+
if self.retinaFix: # On Macs, use the following code
17021706
# wx.DCOverlay does not work properly on Retina displays.
17031707
rubberBandColor = '#C0C0FF'
17041708
if self.prevZoomRect:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.