-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
tkcairo backend #10436
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
tkcairo backend #10436
Conversation
This did not get in under the RC, but for completeness I think we should still put it in 2.2 |
Thanks, got a bit delayed by real life and was also waiting for the other backends to get in first. A few notes on the implementation: I moved the common parts to I also deprecated FigureManagerTkAgg and NavigationToolbar2TkAgg, both because FigureManagerTk and NavigationToolbar2Tk are available and because I would argue that the former should actually be accessed by third parties as AFAICT tkagg does all its rendering to the actual widget in draw() (rather than "buffering" it similarly to how Qt separates draw() from paintEvent()). While it may be interesting to rework this I did not change the design in this PR. |
c35126a
to
de3da7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seemed to work for unchained.py
for both TkAgg and TkCairo.
def full_screen_toggle(self): | ||
is_fullscreen = bool(self.window.attributes('-fullscreen')) | ||
self.window.attributes('-fullscreen', not is_fullscreen) | ||
|
||
|
||
@cbook.deprecated("2.2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this replaced by something in particular?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class was used by the old navigationtoolbar (pre-navigationtoolbar2) so basically unused for a very long time. But I moved it to _backend_tk like everyone else for a normal deprecation period.
You might want to rebase and re-target |
de3da7c
to
8cefced
Compare
Rebased. Before I retarget this: do you want to later "forwardport" from 2.2 to master? |
I expect |
done |
8cefced
to
c6309bf
Compare
needs to be merged into master as well. |
This looks like it will cause chaos when a new version is released out of the development version. If |
@ImportanceOfBeingErnest As far as I can see they are both still there. They are just empty aliases for the General non Agg specific version |
@jenshnielsen I wouldn't preclude that you have better eyes than I have, but I don't see them anywhere. |
They were deprecated in 2.2 and removed in #10426 (3.0) which is admittedly a shorter cycle than normal, but an API removal notice should be enough. |
background="#ffffe0", relief=Tk.SOLID, borderwidth=1) | ||
label.pack(ipadx=1) | ||
class FigureManagerTkAgg(FigureManagerTk): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ImportanceOfBeingErnest here is the figure manager
PR Summary
same as wxcairo and qtcairo, but for tk :-)
PR Checklist