diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-13 13:35:39 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-13 13:35:39 +0200 |
commit | 95df7abfb8ff46fba1bda1e696184682a5766fda (patch) | |
tree | 2f975446d82b84ad281e6ea6b4462d8a19d6e572 /src/ui/text.c | |
parent | 9eba54d16f19fc976b64a678c151a6f03883658c (diff) |
Windows: Further custom frame improvements
Saving the window rectangle and snap mode. Frame title alignment.
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 | |||
1110 | iRect textBounds = alignVisual ? visualBounds_Text(fontId, text) | 1110 | iRect textBounds = alignVisual ? visualBounds_Text(fontId, text) |
1111 | : (iRect){ zero_I2(), advanceRange_Text(fontId, text) }; | 1111 | : (iRect){ zero_I2(), advanceRange_Text(fontId, text) }; |
1112 | textBounds.pos = sub_I2(mid_Rect(rect), mid_Rect(textBounds)); | 1112 | textBounds.pos = sub_I2(mid_Rect(rect), mid_Rect(textBounds)); |
1113 | textBounds.pos.x = iMax(textBounds.pos.x, left_Rect(rect)); /* keep left edge visible */ | ||
1113 | draw_Text_(fontId, textBounds.pos, color, text); | 1114 | draw_Text_(fontId, textBounds.pos, color, text); |
1114 | deinit_Block(&chars); | 1115 | deinit_Block(&chars); |
1115 | } | 1116 | } |