linebender / linebender/druid

Missing or mispositioned text when setting TextAlignment on a label

Open
#1,605 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug widget
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

reported in zulip by @Majora320

The following code paints no label on windows, and in the top-left on mac:

use druid::widget::Label;
use druid::{AppLauncher, TextAlignment, WindowDesc};

fn main() {
    AppLauncher::with_window(WindowDesc::new(
        Label::new("Test").with_text_alignment(TextAlignment::End),
    )).launch(()).unwrap();
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided minimal example using Label::new("Test").with_text_alignment(TextAlignment::End), reproducing it on Windows and macOS. Trace the Label text-alignment path from with_text_alignment and verify that the label is visible and positioned at the end rather than missing or appearing in the top-left.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.