Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from Dec 9, 2015

Conversation

briantoby
Copy link

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
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
Contributor

RobinD42 commented Dec 7, 2015

I'll review the change today as well.

@RobinD42
Copy link
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
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
Member

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

@WeatherGod
Copy link
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
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.

None yet

6 participants