Center text in pager popup and make it at least as wide as it is high.
authorMikael Magnusson <mikachu@gmail.com>
Sun, 28 Sep 2008 20:05:25 +0000 (22:05 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Sat, 4 Oct 2008 10:36:24 +0000 (12:36 +0200)
openbox/popup.c

index fd31846eb8c309b65f3ef2939a54472cad794761..6ceb972bcf7c772a325e093a639e937d808b3527 100644 (file)
@@ -212,6 +212,9 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
         emptyx = emptyy = 0;
     }
 
+    if (texth > textw) textw = texth;
+    popup_set_text_align(self, RR_JUSTIFY_CENTER);
+
     w = textw + emptyx + iconw;
     /* cap it at maxw/minw */
     if (self->maxw) w = MIN(w, self->maxw);