| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| NSRect rect = [messagebox frame]; | ||
| // Entire region to the right of the buttons | ||
| rect.size.width = rectWindow.size.width - rect.origin.x; | ||
| [messagebox setFrame: rect]; |
There was a problem hiding this comment.
The text will wrap depending on width, which is why this width must be set before asking for the height. That is, unless text wrapping is off? But then I guess we would not care about setting the height, so it seems that removing this line will break things.
Sorry, something went wrong.
There was a problem hiding this comment.
Good catch, updated. This is needed if we want to center the text vertically properly based on window resizes.
Sorry, something went wrong.
|
OK, I was able to dig into the cursor updates, and I think the root of the issue is that there is a cursor update event being fired from within the objc code, but we really want to keep control of the cursor changes on the MPL side. So, if we disable the cursorRect that removes the event and fixes the cursor issues we were seeing in #20797, see the final commit: 70a8e32 |
Sorry, something went wrong.
Remove some unnecessary calculations and add some comments. Switch to string passing since we are guaranteed UTF-8 with Python 3 now.
|
@dstansby, pinging you for a review since you mentioned you had a mac to test this out with. Anyone else with a mac is welcome to test this too!
import matplotlib.pyplot as plt
fig, (ax1, ax2) = plt.subplots(ncols=2)
ax1.imshow([[0, 1], [2, 3]])
ax2.contourf([[0, 1], [2, 3]])
plt.show() |
Sorry, something went wrong.
There was a problem hiding this comment.
This works as advertised. I didn't dig too deeply into the code as I'm not versant in ObjectiveC.
Sorry, something went wrong.
We want to keep control of the cursor updates from within MPL, so don't allow the App to push a new cursor update when the window gets updated. This would happen when a TextView would get resized and update the frame.
| Back | FazBrowse Home | New Git URL |
PR Summary
Remove some unnecessary calculations and add some comments. Switch
to string passing since we are guaranteed UTF-8 with Python 3 now.
Set text alignment to the right, which matches the qt5agg backend.
Closes #20797
PR Checklist
Tests and Styling
Documentation