]> Dogcows Code - chaz/openbox/commitdiff
minor movement of code
authorMikael Magnusson <mikachu@comhem.se>
Sat, 16 Jul 2005 01:01:04 +0000 (01:01 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Sat, 16 Jul 2005 01:01:04 +0000 (01:01 +0000)
render/font.c

index 71302467ad7c25da44f379f46a8999a146c6345b..d751cba1a1cf29ea65f20a4035a9600f4bae7d5c 100644 (file)
@@ -264,9 +264,15 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
 #endif /* USE_PANGO */
 
     /* center vertically */
-#ifndef USE_PANGO /* We have to wait for the text string with pango */
+#ifndef USE_PANGO
     y = area->y +
         (area->height - RrFontHeight(t->font)) / 2;
+#else
+    y = area->y +
+        area->height / 2 +
+        /* go to great lengths to center the text while keeping the baseline in
+         * the same place */
+        t->font->pango_descent / PANGO_SCALE;
 #endif
     /* the +2 and -4 leave a small blank edge on the sides */
     x = area->x + 2;
@@ -305,11 +311,6 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
 /*    pango_layout_set_alignment(pl, (PangoAlignment)(t->justify)); */
     pango_layout_get_pixel_extents(pl, NULL, &rect);
     mw = rect.width;
-    y = area->y +
-        area->height / 2 +
-        /* go to great lengths to center the text while keeping the baseline in
-         * the same place */
-        t->font->pango_descent / PANGO_SCALE;
 
 #endif /* USE_PANGO */
 
This page took 0.031921 seconds and 4 git commands to generate.