set teh X so it gets used right
This commit is contained in:
parent
0901ddf891
commit
c791cbfda0
1 changed files with 3 additions and 4 deletions
|
@ -126,7 +126,7 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, Rect *area)
|
||||||
y = area->y +
|
y = area->y +
|
||||||
(area->height - RrFontHeight(t->font, t->shadow, t->offset)) / 2;
|
(area->height - RrFontHeight(t->font, t->shadow, t->offset)) / 2;
|
||||||
/* the +2 and -4 leave a small blank edge on the sides */
|
/* the +2 and -4 leave a small blank edge on the sides */
|
||||||
x += 2;
|
x = area->x + 2;
|
||||||
w = area->width - 4;
|
w = area->width - 4;
|
||||||
h = area->height;
|
h = area->height;
|
||||||
|
|
||||||
|
@ -152,13 +152,12 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, Rect *area)
|
||||||
|
|
||||||
switch (t->justify) {
|
switch (t->justify) {
|
||||||
case RR_JUSTIFY_LEFT:
|
case RR_JUSTIFY_LEFT:
|
||||||
x = area->x;
|
|
||||||
break;
|
break;
|
||||||
case RR_JUSTIFY_RIGHT:
|
case RR_JUSTIFY_RIGHT:
|
||||||
x = area->x + (w - mw);
|
x += (w - mw);
|
||||||
break;
|
break;
|
||||||
case RR_JUSTIFY_CENTER:
|
case RR_JUSTIFY_CENTER:
|
||||||
x = area->x + (w - mw) / 2;
|
x += (w - mw) / 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue