Skip to content

Bug in highlight rendering calculating in the rich_text widget #3268

@64bits

Description

@64bits

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?

Here, I am drawing a highlight on a space after the letter f. As you can see, although the text is in the correct spot, the highlights draw in a different spot. This is because there is a span on this line that has a lot of vertical padding, which pushes the whole line down. The highlight rendering calculation is not taking this into account (unlike the text render), so the highlight is draw far from the letters.

Sorry about the somewhat unhelpful screenshot, it's from my debugging sessions and I've since abandoned this approach.

Image

What is the expected behavior?

The highlight should be draw on the letters.

Version

crates.io release

Operating System

macOS

Do you have any log output?

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