mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
ui: fix right alignment
This commit is contained in:
parent
6db82714dc
commit
2ec530da8c
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ impl<'a> Drawable for DrawableText<'a> {
|
|||
TextAlign::Center => {
|
||||
*caret.x_mut() += self.container_size.x() / 2.0 - get_text_width(&self.text, &scaled_font) / 2.0
|
||||
}
|
||||
TextAlign::Right => *caret.x_mut() = self.container_size.x() - get_text_width(&self.text, &scaled_font),
|
||||
TextAlign::Right => *caret.x_mut() += self.container_size.x() - get_text_width(&self.text, &scaled_font),
|
||||
}
|
||||
|
||||
let mut last_glyph: Option<Glyph> = None;
|
||||
|
|
Loading…
Reference in a new issue