center the text and icon vertically

This commit is contained in:
Dana Jansens 2007-05-10 16:31:45 +00:00
parent 2864a761c7
commit 9c32f34b37

View file

@ -177,7 +177,6 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
textw = self->textw; textw = self->textw;
iconx = textx = l + ob_rr_theme->paddingx; iconx = textx = l + ob_rr_theme->paddingx;
icony = texty = t + ob_rr_theme->paddingy;
emptyx = l + r + ob_rr_theme->paddingx * 2; emptyx = l + r + ob_rr_theme->paddingx * 2;
if (self->hasicon) { if (self->hasicon) {
@ -189,6 +188,9 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
} else } else
iconw = 0; 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; w = textw + emptyx + iconw;
/* cap it at maxw/minw */ /* cap it at maxw/minw */
if (self->maxw) w = MIN(w, self->maxw); if (self->maxw) w = MIN(w, self->maxw);