gh-68166: Add support of "vsapi" in ttk.Style.element_create()#111393
gh-68166: Add support of "vsapi" in ttk.Style.element_create()#111393serhiy-storchaka merged 9 commits intopython:mainfrom
Conversation
* Fix and document support of "vsapi" element type in tkinter.ttk.Style.element_create(). * Add tests for element_create() and other ttk.Style methods. * Add examples for element_create() in the documentation.
|
I verified that the reproducer in the issue still fails main and runs with the patch. |
Doc/library/tkinter.ttk.rst
Outdated
| Create a new element in the current theme, of the given *etype* which is | ||
| expected to be either "image", "from" or "vsapi". The latter is only | ||
| available in Tk 8.6a for Windows XP and Vista and is not described here. | ||
| available in Tk 8.6a for Windows XP and Vista. |
There was a problem hiding this comment.
I have never heard of 'Tk 8.6a'; seems like a typo. XP is no longer supported and 8.5 is not supported on Windows. Is Vista still supported? https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_vsapi.html does say just xp/vista, but does tk not support Win 10/11 'visual styles'?
In any case, the issue test code passing 'vsapi' runs on 8.6.13 on Win 10. Does it do nothing on Win 10? Given
>>> ttk.Style().theme_names()
('winnative', 'clam', 'alt', 'default', 'classic', 'vista', 'xpnative')
the vsapi tests run (and pass on my machine), so my guess is that xp/vista themes are still available and usable. If so, the doc should not suggest not. Perhaps
| available in Tk 8.6a for Windows XP and Vista. | |
| available for Windows and only supports the XP theme. |
There was a problem hiding this comment.
I think that 8.6a refers to the alpha version of 8.6 (perhaps it was in the alpha stage when this was added).
"and only supports the XP theme" is not correct. You can use it in any theme, you can create XP-like or Vista-like theme using this API (and the "vista" theme is created in Tk by calling such commands). I left "available in Tk 8.6 on Windows" (there are other references to 8.6 and 8.5 in docs).
|
Now it is a new feature and will not be backported. |
Fix and documentAdd support of "vsapi" element type in tkinter.ttk.Style.element_create().Add tests for element_create() and other ttk.Style methods.Add examples for element_create() in the documentation.📚 Documentation preview 📚: https://cpython-previews--111393.org.readthedocs.build/