FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-68166: Add support of "vsapi" in ttk.Style.element_create() by serhiy-storchaka · Pull Request #111393 · python/cpython · GitHub

/ cpython Public

gh-68166: Add support of "vsapi" in ttk.Style.element_create() - #111393

Merged
serhiy-storchaka merged 9 commits into
python:mainfrom
serhiy-storchaka:ttk-style-element-create
Nov 27, 2023
Merged

gh-68166: Add support of "vsapi" in ttk.Style.element_create()#111393
serhiy-storchaka merged 9 commits into
python:mainfrom
serhiy-storchaka:ttk-style-element-create

Conversation

serhiy-storchaka commented Oct 27, 2023
edited
Loading

Copy link
Copy Markdown
Member
  • Fix and document Add 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/

* 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.

Copy link
Copy Markdown
Member

I verified that the reproducer in the issue still fails main and runs with the patch.

Comment thread 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Suggested change
available in Tk 8.6a for Windows XP and Vista.
available for Windows and only supports the XP theme.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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).

serhiy-storchaka added type-feature A feature request or enhancement and removed needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes type-bug An unexpected behavior, bug, or error labels Nov 8, 2023
serhiy-storchaka changed the title gh-68166: Fix support of "vsapi" in ttk.Style.element_create() gh-68166: Add support of "vsapi" in ttk.Style.element_create() Nov 8, 2023

Copy link
Copy Markdown
Member Author

Now it is a new feature and will not be backported.

serhiy-storchaka merged commit 4dcfd02 into python:main Nov 27, 2023
serhiy-storchaka deleted the ttk-style-element-create branch November 27, 2023 18:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-tkinter type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL