Revert popup.c from 74ef28
authorMikael Magnusson <mikachu@comhem.se>
Fri, 8 Feb 2008 12:54:32 +0000 (13:54 +0100)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 28 Feb 2008 03:35:29 +0000 (04:35 +0100)
openbox/popup.c

index f5ee7c4..fd31846 100644 (file)
@@ -179,15 +179,9 @@ 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->hasicon) {
-        if (self->h)
-            h = self->h - emptyy;
-        h = h * self->iconhm + emptyy;
-    } else {
-        if (self->h)
-            texth = self->h - emptyy;
-        h = texth * self->iconhm + emptyy;
-    }
+    if (self->h)
+        texth = self->h - emptyy;
+    h = texth * self->iconhm + emptyy;
 
     if (self->textw)
         textw = self->textw;
@@ -196,8 +190,8 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
 
     emptyx = l + r + ob_rr_theme->paddingx * 2;
     if (self->hasicon) {
-        iconw = h * self->iconwm;
-        iconh = h * self->iconhm;
+        iconw = texth * self->iconwm;
+        iconh = texth * self->iconhm;
         textx += iconw + ob_rr_theme->paddingx;
         if (textw)
             emptyx += ob_rr_theme->paddingx; /* between the icon and text */