SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
230 stars 21 forks source link

Text boxes are too tall #110

Closed Ralith closed 11 months ago

Ralith commented 11 months ago

e.g. the textbox example is consistently more than two lines tall, even when updated or initialized with one line of text or the empty string. A similar effect is visible in a column layout.

Ralith commented 11 months ago

The cursor is also too tall; see e.g.:

image
Ralith commented 11 months ago

Here's the same textbox initialized with three lines, with the cursor on the top line:

image
LPGhatguy commented 11 months ago

Found to be caused by scale factor not being part of some of the cursor math.

Fixed in cb45454dffaa41b1dddc3aadce4ac29a9a3d901f.