From 3918080a400e691565e9aaf1e0a5d5b02d2d2b80 Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Wed, 10 Jun 2020 01:33:50 -0400 Subject: [PATCH] Fixed minimum array gop size on the parent window due to the garray text size which was before spilling over the minimum box size and not maintaining proper margins. --- pd/src/g_graph.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c index dfbf6739c..8772fb872 100644 --- a/pd/src/g_graph.c +++ b/pd/src/g_graph.c @@ -1221,7 +1221,7 @@ void graph_checkgop_rect(t_gobj *z, t_glist *glist, } // check if the gop has array members and if so, - // make its minimum size based on array names size + // make its minimum size based on array name's size t_symbol *arrayname; int cols_tmp = 0; int arrayname_cols = 0; @@ -1240,10 +1240,10 @@ void graph_checkgop_rect(t_gobj *z, t_glist *glist, { int fontwidth = sys_fontwidth(x->gl_font); int fontheight = sys_fontheight(x->gl_font); - if ((arrayname_rows * fontheight - 1) > (*yp2 - *yp1)) - *yp2 = *yp1 + (arrayname_rows * fontheight - 1); - if ((arrayname_cols * fontwidth + 2) > (*xp2 - *xp1)) - *xp2 = *xp1 + (arrayname_cols * fontwidth + 2); + if ((arrayname_rows * fontheight + 4) > (*yp2 - *yp1)) + *yp2 = *yp1 + (arrayname_rows * fontheight + 4); + if ((arrayname_cols * fontwidth + 5) > (*xp2 - *xp1)) + *xp2 = *xp1 + (arrayname_cols * fontwidth + 5); } // failsafe where we cannot have a gop that is smaller than 1x1 pixels -- GitLab