X Tutup
Skip to content

WX/WXagg backend add code that zooms properly on a Mac with a Retina display#5631

Merged
jenshnielsen merged 5 commits intomatplotlib:masterfrom
briantoby:mac-wx-retina_fix
Dec 9, 2015
Merged

WX/WXagg backend add code that zooms properly on a Mac with a Retina display#5631
jenshnielsen merged 5 commits intomatplotlib:masterfrom
briantoby:mac-wx-retina_fix

Conversation

@briantoby
Copy link
Copy Markdown

This uses a slower method for drawing the zoom rubberband box on all Macs (perhaps not needed in Phoenix?) because I don't know a way to detect if a Retina display is present.

Note that the added self.canvas.draw() call in the FigureManagerWx.show() method comes from the version in the Canopy dist for 1.5.0.

…d self.canvas.draw() call in the FigureManagerWx.show() method comes from the Canopy dist
@jenshnielsen jenshnielsen changed the title add code that zooms properly on a Mac with a Retina display WX/WXagg backend add code that zooms properly on a Mac with a Retina display Dec 7, 2015
@jenshnielsen
Copy link
Copy Markdown
Member

Thanks, I will try to take a look later. Last time I checked it was not fixed in Phoenix I think it is a bug in Wx and not the python bindings

@tacaswell tacaswell modified the milestones: Critical bugfix release (1.5.1), next bug fix release (2.0.1) Dec 7, 2015
@RobinD42
Copy link
Copy Markdown
Contributor

RobinD42 commented Dec 7, 2015

I'll review the change today as well.

@RobinD42
Copy link
Copy Markdown
Contributor

RobinD42 commented Dec 8, 2015

It looks good to me, other than a style mismatch (self.RetinaFix should probably be self.retinaFix to match the existing style in the module).

In addition, it looks like there is an undocumented method in wx that can be called to help determine if retina is currently in use for a window or a DC. It's not wrapped by wxPython yet but I'll get it added and try to get at least a preview build done soon so it can be tested. In the meantime you may want to add a reminder comment in the code that when window.GetContentScaleFactor() and/or dc.GetContentScaleFactor() are added then they can be used to determine if the retina workround is needed. (Or perhaps we can actually use it to fix the overlay problem...)

@briantoby
Copy link
Copy Markdown
Author

Hmmm, travis failure makes no sense. Passed that before and error messages seem unconnected to the one file I changed. What gives?

@WeatherGod
Copy link
Copy Markdown
Member

It is a spurious LaTeX error that we get sometimes on Travis. I restarted that particular test.

@WeatherGod
Copy link
Copy Markdown
Member

Tests now pass. I don't have a retina display, so I can't do much else. I'll leave this up to one of the other devs to finalize.

jenshnielsen added a commit that referenced this pull request Dec 9, 2015
WX/WXagg backend add code that zooms properly on a Mac with a Retina display
@jenshnielsen jenshnielsen merged commit e75b44a into matplotlib:master Dec 9, 2015
jenshnielsen added a commit that referenced this pull request Dec 9, 2015
WX/WXagg backend add code that zooms properly on a Mac with a Retina display
@jenshnielsen
Copy link
Copy Markdown
Member

backported to 1.5.x as 911f349

@QuLogic QuLogic modified the milestones: Critical bugfix release (1.5.1), next bug fix release (2.0.1) Dec 9, 2015
@briantoby briantoby deleted the mac-wx-retina_fix branch December 9, 2015 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

X Tutup