tomlin7 / biscuit

Aesthetic, lightweight code editor with extension support
https://tomlin7.github.io/biscuit
MIT License
189 stars 27 forks source link

App crashes due to hover renderer shrink property #412

Open tomlin7 opened 1 month ago

tomlin7 commented 1 month ago

Bug

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

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