Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tiny-skia] does not truncate long text inside of a TextInput when the window size is changed #2740

Open
4 tasks done
BornIncompetence opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@BornIncompetence
Copy link

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Text that is entered inside of the TextInput widget does not get clipped inside when adjusting the size of the window.

Compiling this snippet on 13.1 with default-features = false and features = ["tiny-skia"]

fn main() {
    let _ = iced::run("", update, view);
}

fn update(ctx: &mut String, msg: String) {
    *ctx = msg;
}

fn view(ctx: &String) -> iced::Element<String> {
    iced::widget::container(
        iced::widget::text_input(
            "This is a very long string that should be clipped inside of the text input",
            ctx,
        )
        .on_input(|msg| msg),
    )
    .width(iced::Length::Fill)
    .align_x(iced::Alignment::Center)
    .padding([0, 300])
    .into()
}
2025-01-21.11-38-41.mp4

What is the expected behavior?

Text should be clipped inside the TextInput, as is the case when using the wgpu backend.

2025-01-21.11-42-56.mp4

Version

crates.io release

Operating System

Windows

Do you have any log output?

@BornIncompetence BornIncompetence added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant