center the text and icon vertically
Dana Jansens danakj@orodu.net
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
openbox/popup.c
→
openbox/popup.c
@@ -177,7 +177,6 @@ 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) {@@ -188,6 +187,9 @@ if (textw)
emptyx += ob_rr_theme->paddingx; /* between the icon and 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 */