# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1327085230 0 # Node ID 035bc006afbe661fcef8c41e4b4ef16d3a3a59c2 # Parent 007ed833ac79b788859184f88e79451b54c8299c Experimental change... halfway between min and max for tree controls. diff -r 007ed833ac79 -r 035bc006afbe gtk/dw.c --- a/gtk/dw.c Fri Jan 20 04:52:12 2012 +0000 +++ b/gtk/dw.c Fri Jan 20 18:47:10 2012 +0000 @@ -10087,9 +10087,9 @@ } else { - /* Set to max for others */ - *thiswidth = _DW_SCROLLED_MAX_WIDTH; - *thisheight = _DW_SCROLLED_MAX_HEIGHT; + /* Set to half for others */ + *thiswidth = (int)((_DW_SCROLLED_MAX_WIDTH + _DW_SCROLLED_MIN_WIDTH)/2); + *thisheight = (int)((_DW_SCROLLED_MAX_HEIGHT + _DW_SCROLLED_MIN_HEIGHT)/2); } if(*thiswidth < _DW_SCROLLED_MIN_WIDTH) *thiswidth = _DW_SCROLLED_MIN_WIDTH; diff -r 007ed833ac79 -r 035bc006afbe gtk3/dw.c --- a/gtk3/dw.c Fri Jan 20 04:52:12 2012 +0000 +++ b/gtk3/dw.c Fri Jan 20 18:47:10 2012 +0000 @@ -8348,8 +8348,9 @@ { if(g_object_get_data(G_OBJECT(widget), "_dw_tree_type") == GINT_TO_POINTER(_DW_TREE_TYPE_TREE)) { - *thiswidth = _DW_SCROLLED_MAX_WIDTH; - *thisheight = _DW_SCROLLED_MAX_HEIGHT; + /* Set to half for tree */ + *thiswidth = (int)((_DW_SCROLLED_MAX_WIDTH + _DW_SCROLLED_MIN_WIDTH)/2); + *thisheight = (int)((_DW_SCROLLED_MAX_HEIGHT + _DW_SCROLLED_MIN_HEIGHT)/2); } else if(GTK_IS_TEXT_VIEW(widget)) { diff -r 007ed833ac79 -r 035bc006afbe mac/dw.m --- a/mac/dw.m Fri Jan 20 04:52:12 2012 +0000 +++ b/mac/dw.m Fri Jan 20 18:47:10 2012 +0000 @@ -3635,8 +3635,8 @@ /* Tree */ else if([ object isMemberOfClass:[DWTree class] ]) { - thiswidth = _DW_SCROLLED_MAX_WIDTH; - thisheight = _DW_SCROLLED_MAX_HEIGHT; + thiswidth = (int)((_DW_SCROLLED_MAX_WIDTH + _DW_SCROLLED_MIN_WIDTH)/2); + thisheight = (int)((_DW_SCROLLED_MAX_HEIGHT + _DW_SCROLLED_MIN_HEIGHT)/2); } /* Any other control type */ else if([ object isKindOfClass:[ NSControl class ] ]) diff -r 007ed833ac79 -r 035bc006afbe os2/dw.c --- a/os2/dw.c Fri Jan 20 04:52:12 2012 +0000 +++ b/os2/dw.c Fri Jan 20 18:47:10 2012 +0000 @@ -4788,8 +4788,8 @@ /* Container and Tree */ else if(strncmp(tmpbuf, "#37", 4)==0) { - thiswidth = _DW_SCROLLED_MAX_WIDTH; - thisheight = _DW_SCROLLED_MAX_HEIGHT; + thiswidth = (int)((_DW_SCROLLED_MAX_WIDTH + _DW_SCROLLED_MIN_WIDTH)/2); + thisheight = (int)((_DW_SCROLLED_MAX_HEIGHT + _DW_SCROLLED_MIN_HEIGHT)/2); } /* Button */ else if(strncmp(tmpbuf, "#3", 3)==0) diff -r 007ed833ac79 -r 035bc006afbe win/dw.c --- a/win/dw.c Fri Jan 20 04:52:12 2012 +0000 +++ b/win/dw.c Fri Jan 20 18:47:10 2012 +0000 @@ -4592,8 +4592,8 @@ /* Tree */ else if(strnicmp(tmpbuf, WC_TREEVIEW, strlen(WC_TREEVIEW)+1)== 0) { - thiswidth = _DW_SCROLLED_MAX_WIDTH; - thisheight = _DW_SCROLLED_MAX_HEIGHT; + thiswidth = (int)((_DW_SCROLLED_MAX_WIDTH + _DW_SCROLLED_MIN_WIDTH)/2); + thisheight = (int)((_DW_SCROLLED_MAX_HEIGHT + _DW_SCROLLED_MIN_HEIGHT)/2); } /* Buttons */ else if(strnicmp(tmpbuf, BUTTONCLASSNAME, strlen(BUTTONCLASSNAME)+1) == 0)