From 668830a54aa5c9e9d08c8088c180117e906723fc Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Tue, 20 Feb 2024 22:48:18 +0100 Subject: [PATCH] vertical text alignment --- src/gui/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/mod.rs b/src/gui/mod.rs index 162a508..806dbc3 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -695,7 +695,7 @@ impl Control { .fc .get_text_size(&self.text, self.size, canvas.graphics.clone())?; - let mut cur_y = self.rect.y + (self.rect.h) - (h * 0.5); + let mut cur_y = self.rect.y + (self.rect.h) - (h * 0.5) - (self.size as f32 * 0.25); for line in self.text.lines() { let mut cur_x = self.rect.x + (self.rect.w * 0.5) - (w * 0.5); for glyph in app