iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
22.96k stars 1.06k forks source link

The buttons contain different single English characters, yet their sizes vary. #2399

Closed Seikaijyu closed 3 weeks ago

Seikaijyu commented 3 weeks ago

Is there an existing issue for this?

Is this issue related to iced?

What happened?

Using the '+' button will noticeably increase the size compared to using the '-' button. In the example 'examples/counter', change the text to '+' and '-' to see the results. image

What is the expected behavior?

The two buttons are the same size.

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

lufte commented 3 weeks ago

I say this makes sense. The button expands to fit the text inside of it and, unless you're using a monospaced font, different characters have different lengths.

Seikaijyu commented 3 weeks ago

Okay, thank you very much for your explanation