From 2ec530da8c67b5360f8d606ccd9019fdad1eeb2b Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Sat, 18 Jul 2020 17:05:22 -0700 Subject: [PATCH] ui: fix right alignment --- crates/bevy_text/src/draw.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_text/src/draw.rs b/crates/bevy_text/src/draw.rs index 7d09446363..649ce0c58d 100644 --- a/crates/bevy_text/src/draw.rs +++ b/crates/bevy_text/src/draw.rs @@ -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 = None;