Commit e792cdc5 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

Further refined auto-resizing logic and improved redrawing of the gop...

Further refined auto-resizing logic and improved redrawing of the gop rectangle to account for object text size
parent 5e13ec71
......@@ -1803,7 +1803,7 @@ void canvasgop__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx, t_flo
if (x->gl_pixheight < SCALE_GOP_MINHEIGHT)
x->gl_pixheight = SCALE_GOP_MINHEIGHT;
// TODO check if the text is not hidden
// check if the text is not hidden
// if so make minimum width and height based retrieved from getrect
if (x->gl_hidetext == 0 && x->gl_owner) {
gobj_getrect((t_gobj*)x, x->gl_owner, &x1, &y1, &x2, &y2);
......
......@@ -1091,7 +1091,8 @@ static void text_getrect(t_gobj *z, t_glist *glist,
int m = ( ni > no ? ni : no);
//let's see if the object has more nlets than its text width and resize them accordingly
//UNLESS we are gop in which case it is user's choice how big/small they want the object
if (!((t_glist *)z)->gl_isgraph) {
if (pd_class(&z->g_pd) != canvas_class ||
pd_class(&z->g_pd) == canvas_class && !((t_glist *)z)->gl_isgraph) {
if (width < (IOWIDTH * m) * 2 - IOWIDTH) {
//we have to resize the object
width = (IOWIDTH * m) * 2 - IOWIDTH;
......
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