Closed arichar6 closed 1 year ago
Thanks for the report! Confirmed that this behavior is reproducible; it appears to be a bug in the cell renderer not clipping content to the box border.
This has been significantly improved on by #822; however, I think there's room for more improvement.
The new code truncates text at the word boundary, but Cocoa has builtin support for text being truncated at the character level, and auto-inserting an ellipsis (...) when the text has been truncated - it even allows for automated squeezing of the kerning if slightly tighter spacing between characters will let a word fit. These features are part of NSTextField; I presume they're adaptable to NSTextFieldCell, but I can't say I can point to an obvious page of docs that says so.
Expected Behavior
When a table cell has content longer than the cell width, I expect the text to be "hidden" behind the adjacent column. Preferably there would be an ellipsis character (…) appended to the truncated text to indicate that text is hidden.
Current Behavior
Using the cocoa backend for macOS, the text is rendered on top of the text from the adjacent column.
Steps to reproduce
Your Environment
Python Version: 3.6.7
Operating System and Version
Toga Target (the type of app you are trying to generate)