diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-10 16:31:45 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-10 16:31:45 +0000 |
| commit | 9c32f34b3766de01c51bc5d00c17d68804ab2603 (patch) | |
| tree | 91f1dca9107979ca7d113d92e381c1e37a66716b /openbox/popup.c | |
| parent | 2864a761c7fb4fd0cd04af22ba02d4b83a970a96 (diff) | |
center the text and icon vertically
Diffstat (limited to 'openbox/popup.c')
| -rw-r--r-- | openbox/popup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openbox/popup.c b/openbox/popup.c index 5c96f073..d1e1a31f 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -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); |
