Commit 3918080a authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

Fixed minimum array gop size on the parent window due to the garray text size...

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.
parent 242306e8
Pipeline #1975 passed with stage
in 328 minutes and 57 seconds
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment