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

UI text is sometimes shifted to the left of where it should be #8525

Open
nicoburns opened this issue May 1, 2023 · 3 comments
Open

UI text is sometimes shifted to the left of where it should be #8525

nicoburns opened this issue May 1, 2023 · 3 comments
Labels
A-Text Rendering and layout for characters A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior

Comments

@nicoburns
Copy link
Contributor

nicoburns commented May 1, 2023

Bevy version

cf4bfb649dd06b4b6826424dbbc4efea9a6d924a

What you did

  • Removed the padding from the sidebar in the grid example (examples/ui/grid.rs)
  • Ran the grid example

What went wrong

Text in the sidebar overflows out of the sidebar element on the left hand side. The exact amount it overflows by depends on how wide the sidebar is (which can be changed by resizing the window). Note: text is left-aligned.

Screenshot 2023-05-01 at 17 01 06

What should have happened

The text should be entirely contained within the node (unless the width is made so small that a single word cannot fit, but it that case it should overflow to the right not the left).

Additional information

I suspect this is a bug in glyph_brush_layout, but I'm not sure about that.

@nicoburns nicoburns added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets labels May 1, 2023
@nicoburns nicoburns added this to the 0.11 milestone May 1, 2023
@ickshonpe
Copy link
Contributor

ickshonpe commented May 10, 2023

Perhaps it's an artifact caused by the rounding of the text bounds by the measure func to force glyph_brush_layout to wrap lines consistently. Will investigate.

@alice-i-cecile
Copy link
Member

Could DioxusLabs/taffy#501 be responsible for this?

@alice-i-cecile alice-i-cecile removed this from the 0.11 milestone Jun 21, 2023
@alice-i-cecile
Copy link
Member

Removing from the milestone as this isn't critical and we don't have a fix ready.

@viridia viridia added the A-Text Rendering and layout for characters label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Text Rendering and layout for characters A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

No branches or pull requests

4 participants