Skip to content

Label with LayoutJob halign LEFT is still centering the text #1818

Open
@cbeust

Description

@cbeust

Describe the bug

Creating a LayoutJob as follows is still causing the text to be centered in the Label:

let mut layout_job = LayoutJob::simple("Simple layout".to_string(), FontId::default(), Color32::GREEN, 100.0);
layout_job.halign = Align::LEFT;
ui.add(vec2(500.0, 15.0), Label::new(layout_job);

Expected behavior

The text should be aligned left.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is brokenlayoutRelated to widget layouttextProblems related to text

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions