]> Dogcows Code - chaz/openbox/commitdiff
center the text and icon vertically
authorDana Jansens <danakj@orodu.net>
Thu, 10 May 2007 16:31:45 +0000 (16:31 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 10 May 2007 16:31:45 +0000 (16:31 +0000)
openbox/popup.c

index 5c96f073a90b71d68ac449c0bdf605eff33e8714..d1e1a31ff832064421b4b1af75fb68b4280b67fb 100644 (file)
@@ -177,7 +177,6 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
         textw = self->textw;
 
     iconx = textx = l + ob_rr_theme->paddingx;
-    icony = texty = t + ob_rr_theme->paddingy;
 
     emptyx = l + r + ob_rr_theme->paddingx * 2;
     if (self->hasicon) {
@@ -189,6 +188,9 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
     } else
         iconw = 0;
 
+    texty = (h - texth - emptyy) / 2 + t + ob_rr_theme->paddingy;
+    icony = (h - iconh - emptyy) / 2 + t + ob_rr_theme->paddingy;
+
     w = textw + emptyx + iconw;
     /* cap it at maxw/minw */
     if (self->maxw) w = MIN(w, self->maxw);
This page took 0.025594 seconds and 4 git commands to generate.