Fix calculation bug with TextEdit::get_line_height()

When `get_line_height()` is less than `1`, there is no visible text.
So limit the return value of `get_line_height()` to **not less** than
`1` for calculation.
This commit is contained in:
Rindbee
2023-04-30 10:54:50 +08:00
parent 9f12e7b52d
commit 391bce44b7
2 changed files with 6 additions and 2 deletions

View File

@@ -347,7 +347,8 @@
<method name="get_line_height" qualifiers="const">
<return type="int" />
<description>
Returns the height of a largest line.
Returns the maximum value of the line height among all lines.
[b]Note:[/b] The return value is influenced by [theme_item line_spacing] and [theme_item font_size]. And it will not be less than [code]1[/code].
</description>
</method>
<method name="get_line_width" qualifiers="const">