center the text and icon vertically
This commit is contained in:
parent
2864a761c7
commit
9c32f34b37
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue