Skip to content

text("...").wrapping(Wrapping::None) is ignored #2676

@IohannRabeson

Description

@IohannRabeson

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?

Even if I specify Wrapping::None, the text is wrapped.
Here is a SSCCE:

use iced::{widget::text, Element};

#[derive(Default)]
struct State;

#[derive(Debug)]
enum Message {}

fn main() -> iced::Result {
    iced::run("Text Wrapping Bug", update, view)
}

fn update(_state: &mut State, _message: Message) {}

fn view(_state: &State) -> Element<Message> {
    text("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.")
    .wrapping(text::Wrapping::None)
    .into()
}
Screenshot 2024-11-24 at 23 58 55

What is the expected behavior?

I expect to see only one line of text as I specify Wrapping::None.

Version

crates.io release

Operating System

macOS

Do you have any log output?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions