Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedOct 27, 2023
edited
Loading

  • 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.
@terryjreedy
Copy link
Member

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

@@ -1392,7 +1392,7 @@ option. If you don't know the class name of a widget, use the method

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
Member

Choose a reason for hiding this comment

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

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
availablein Tk 8.6a for WindowsXPand Vista.
availablefor Windows and only supports theXPtheme.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

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

chrstphrchvz reacted with thumbs up emoji
@serhiy-storchakaserhiy-storchaka added type-featureA feature request or enhancement and removed needs backport to 3.11only security fixes needs backport to 3.12only security fixes type-bugAn unexpected behavior, bug, or error labelsNov 8, 2023
@serhiy-storchakaserhiy-storchaka changed the titlegh-68166: Fix support of "vsapi" in ttk.Style.element_create()gh-68166: Add support of "vsapi" in ttk.Style.element_create()Nov 8, 2023
@serhiy-storchaka
Copy link
MemberAuthor

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

@serhiy-storchakaserhiy-storchaka merged commit4dcfd02 intopython:mainNov 27, 2023
@serhiy-storchakaserhiy-storchaka deleted the ttk-style-element-create branchNovember 27, 2023 18:57
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@terryjreedyterryjreedyterryjreedy left review comments

Assignees
No one assigned
Labels
topic-tkintertype-featureA feature request or enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@serhiy-storchaka@terryjreedy

[8]ページ先頭

©2009-2025 Movatter.jp