From 95df7abfb8ff46fba1bda1e696184682a5766fda Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 13 Feb 2021 13:35:39 +0200 Subject: Windows: Further custom frame improvements Saving the window rectangle and snap mode. Frame title alignment. --- src/ui/text.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ui/text.c') diff --git a/src/ui/text.c b/src/ui/text.c index 218e7565..71a26250 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -1110,6 +1110,7 @@ void drawCentered_Text(int fontId, iRect rect, iBool alignVisual, int color, con iRect textBounds = alignVisual ? visualBounds_Text(fontId, text) : (iRect){ zero_I2(), advanceRange_Text(fontId, text) }; textBounds.pos = sub_I2(mid_Rect(rect), mid_Rect(textBounds)); + textBounds.pos.x = iMax(textBounds.pos.x, left_Rect(rect)); /* keep left edge visible */ draw_Text_(fontId, textBounds.pos, color, text); deinit_Block(&chars); } -- cgit v1.2.3