always set the multipliers just dont allow 0
This commit is contained in:
parent
9c32f34b37
commit
6ff520d02a
1 changed files with 6 additions and 4 deletions
|
@ -326,8 +326,9 @@ void icon_popup_delay_show(ObIconPopup *self, gulong usec,
|
||||||
|
|
||||||
void icon_popup_icon_size_multiplier(ObIconPopup *self, guint wm, guint hm)
|
void icon_popup_icon_size_multiplier(ObIconPopup *self, guint wm, guint hm)
|
||||||
{
|
{
|
||||||
if (wm != 0) self->popup->iconwm = wm;
|
/* cap them at 1 */
|
||||||
if (hm != 0) self->popup->iconhm = hm;
|
self->popup->iconwm = MAX(1, wm);
|
||||||
|
self->popup->iconhm = MAX(1, hm);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pager_popup_draw_icon(gint px, gint py, gint w, gint h,
|
static void pager_popup_draw_icon(gint px, gint py, gint w, gint h,
|
||||||
|
@ -503,6 +504,7 @@ void pager_popup_delay_show(ObPagerPopup *self, gulong usec,
|
||||||
|
|
||||||
void pager_popup_icon_size_multiplier(ObPagerPopup *self, guint wm, guint hm)
|
void pager_popup_icon_size_multiplier(ObPagerPopup *self, guint wm, guint hm)
|
||||||
{
|
{
|
||||||
if (wm != 0) self->popup->iconwm = wm;
|
/* cap them at 1 */
|
||||||
if (hm != 0) self->popup->iconhm = hm;
|
self->popup->iconwm = MAX(1, wm);
|
||||||
|
self->popup->iconhm = MAX(1, hm);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue