X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fpopup.c;h=d1e1a31ff832064421b4b1af75fb68b4280b67fb;hb=9c32f34b3766de01c51bc5d00c17d68804ab2603;hp=f341e0922dd543501e555875c032f0266ea23d17;hpb=9a3f05a780f8cbfeb68626552d25c48ab0245ca3;p=chaz%2Fopenbox diff --git a/openbox/popup.c b/openbox/popup.c index f341e092..d1e1a31f 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -169,17 +169,14 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text) /* get the height, which is also used for the icon width */ emptyy = t + b + ob_rr_theme->paddingy * 2; - if (self->h) { - h = self->h; - texth = h - emptyy; - } else - h = texth * self->iconhm + emptyy; + if (self->h) + texth = self->h - emptyy; + h = texth * self->iconhm + emptyy; if (self->textw) 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) { @@ -191,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);