From d364b60ebee9689d8f94d4148b024ff5b7eafc84 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 18 Aug 2016 14:46:33 -0300 Subject: [PATCH] eeshow/gui/over.h, over.c: allow also setting of min/max height --- eeshow/gui/over.c | 3 +++ eeshow/gui/over.h | 1 + 2 files changed, 4 insertions(+) diff --git a/eeshow/gui/over.c b/eeshow/gui/over.c index 1d2c039..a741df6 100644 --- a/eeshow/gui/over.c +++ b/eeshow/gui/over.c @@ -101,6 +101,9 @@ fprintf(stderr, "%d + %d %d + %d\n", ink_w = ink_w > style->wmin ? ink_w : style->wmin; ink_w = !style->wmax || ink_w < style->wmax ? ink_w : style->wmax; w = ink_w + 2 * style->pad; + + ink_h = ink_h > style->hmin ? ink_h : style->hmin; + ink_h = !style->hmax || ink_h < style->hmax ? ink_h : style->hmax; h = ink_h + 2 * style->pad; if (dx < 0) diff --git a/eeshow/gui/over.h b/eeshow/gui/over.h index c6f8fed..498405e 100644 --- a/eeshow/gui/over.h +++ b/eeshow/gui/over.h @@ -29,6 +29,7 @@ struct color { struct overlay_style { const char *font; unsigned wmin, wmax; + unsigned hmin, hmax; unsigned radius; unsigned pad; /* in x and y direction; adjust for radius ! */ unsigned skip; /* should be list-specific */