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

TextInput with no-wrap and manual newlines messes up text rendering #7414

Closed
ubruhin opened this issue Jan 21, 2025 · 1 comment
Closed

TextInput with no-wrap and manual newlines messes up text rendering #7414

ubruhin opened this issue Jan 21, 2025 · 1 comment
Labels
bug Something isn't working need triaging Issue that the owner of the area still need to triage

Comments

@ubruhin
Copy link
Contributor

ubruhin commented Jan 21, 2025

Bug Description

When having newlines in the text property of TextInput, I expect them to be rendered. Currently they are rendered only when word wrap is enabled, but this may add even more linebreaks than intended. Manual newlines should always be rendered, no matter what wrap mode is set.

With winit the rendering is even broken:

Image

Reproducible Code (if applicable)

export component AppWindow inherits Window {
    width: 200px;
    height: 200px;

    TextInput {
        text: "Foo\nBar";
    }
}

Environment Details

  • Slint Version: 1.9.2
  • Platform/OS: Ubuntu 22.04, X11
  • Backend/Renderer: winit

Product Impact

Use-case in LibrePCB (not a blocker for now):

Image

@ubruhin ubruhin added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Jan 21, 2025
@ogoffart
Copy link
Member

I'm going to close as duplicate of #7413
Same problem that when single-line:true (the default) we get rendering divergences.
I'm going to edit the description of #7416 to merge the two issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need triaging Issue that the owner of the area still need to triage
Projects
None yet
Development

No branches or pull requests

2 participants