Skip to content
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

App crashes due to hover renderer shrink property #412

Open
tomlin7 opened this issue Oct 11, 2024 · 0 comments
Open

App crashes due to hover renderer shrink property #412

tomlin7 opened this issue Oct 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working language features syntax highlighting, lsp, other language features layout Related to biscuit layout suggestions needed bugs/features that are still not figured out and need solution suggestions

Comments

@tomlin7
Copy link
Owner

tomlin7 commented Oct 11, 2024

Bug

The shrink property of tkhtml3 causes crash: https://github.com/Andereoo/TkinterWeb/blob/main/tkinterweb/bindings.py#L393

  • shrink is used to make the hover popup size wrt the content size
  • when multiple multiline docs of varying size are hovered fast, internal tk error occurs (uncatchable) due to ambiguity occurred in sizing the window, and app crashes.

Temporarily resolved this by disabling shrink. Hover docs will now take a fixed size irrespective of the doc length. Temporary fixes: #411

image

Need suggestions on how to handle the sizing of hover popup properly.

Notes

From tkhtml3 docs: http://tkhtml.tcl.tk/tkhtml.html

Command-Line Name: -shrink
Database Name: shrink
Database Class: Shrink

This boolean option governs the way the widgets requested width and height are calculated. If it is set to false (the default), then the requested width and height are set by the -width and -height options as per usual.

If this option is set to true, then the widgets requested width and height are determined by the current document. Each time the document layout is calculated, the widgets requested height and width are set to the size of the document layout. If the widget is unmapped when the layout is calculated, then the value of the -width option is used to determine the width of the initial containing block for the layout. Otherwise, the current window width is used.

System Information

  • OS: Windows
  • Python Version: 3.12.5
@tomlin7 tomlin7 added bug Something isn't working suggestions needed bugs/features that are still not figured out and need solution suggestions labels Oct 11, 2024
@tomlin7 tomlin7 self-assigned this Oct 11, 2024
@tomlin7 tomlin7 added layout Related to biscuit layout language features syntax highlighting, lsp, other language features labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working language features syntax highlighting, lsp, other language features layout Related to biscuit layout suggestions needed bugs/features that are still not figured out and need solution suggestions
Projects
None yet
Development

No branches or pull requests

1 participant