summaryrefslogtreecommitdiff
path: root/render/font.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-06-25 21:18:16 +0000
committerDana Jansens <danakj@orodu.net>2003-06-25 21:18:16 +0000
commitc791cbfda0865a9716419c533b665d0550ae2916 (patch)
tree0500e0c6998e51fa5b2cf5f008e2336aee7c4915 /render/font.c
parent0901ddf8911cfaf0f0f3d3c4010809071be42855 (diff)
set teh X so it gets used right
Diffstat (limited to 'render/font.c')
-rw-r--r--render/font.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/render/font.c b/render/font.c
index e0a12a1a..9f1f5ef8 100644
--- a/render/font.c
+++ b/render/font.c
@@ -126,7 +126,7 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, Rect *area)
y = area->y +
(area->height - RrFontHeight(t->font, t->shadow, t->offset)) / 2;
/* the +2 and -4 leave a small blank edge on the sides */
- x += 2;
+ x = area->x + 2;
w = area->width - 4;
h = area->height;
@@ -152,13 +152,12 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, Rect *area)
switch (t->justify) {
case RR_JUSTIFY_LEFT:
- x = area->x;
break;
case RR_JUSTIFY_RIGHT:
- x = area->x + (w - mw);
+ x += (w - mw);
break;
case RR_JUSTIFY_CENTER:
- x = area->x + (w - mw) / 2;
+ x += (w - mw) / 2;
break;
}