swift-cross-ui
swift-cross-ui copied to clipboard
Gtk[3]Backend: Fix TextEditor height calculation on macOS
On macOS, both GtkBackend and Gtk3Backend overestimate the height of the content of text editors by some small amount related to the number of lines (seems like about 1/2 a pixel per line but maybe less).
This issue doesn't occur on Linux, and also doesn't occur with Text, so there's likely some text layout property that differs between GtkLabel and GtkTextView.
To reproduce the issue, create a TextEditor with .fixedSize(horizontal: false, vertical: true) and a background, and then enter twenty lines of input or so. Observe that the text editor is about a line taller than it should be.