bevyengine / bevyengine/bevy

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

Open
#8,525 3 comments 0 reactions 0 assignees View on GitHub
A-Text A-UI C-Bug
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.