# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1337064567 0 # Node ID 570a03dabdc2bd4526305883087fc3fbb32c6f74 # Parent aa2bd0d8bf275506df41c914ea8c472a3a312aa0 Slight improvement... check the flat flags and adjust the required size and minimum sizes for the widget. diff -r aa2bd0d8bf27 -r 570a03dabdc2 win/dw.c --- a/win/dw.c Tue May 15 06:37:39 2012 +0000 +++ b/win/dw.c Tue May 15 06:49:27 2012 +0000 @@ -1511,12 +1511,17 @@ HIMAGELIST imlist = (HIMAGELIST)SendMessage(handle, TB_GETIMAGELIST, 0, 0); int thiswidth = 20, thisheight = 20, minsize = 24; + if(imlist) + ImageList_GetIconSize(imlist, &thiswidth, &thisheight); + /* If we are flat the size can be smaller */ if(GetWindowLong(handle, GWL_STYLE) & TBSTYLE_FLAT) minsize = 20; - - if(imlist) - ImageList_GetIconSize(imlist, &thiswidth, &thisheight); + else + { + thiswidth += 4; + thisheight += 4; + } if(thiswidth < minsize) thiswidth = minsize; @@ -4662,13 +4667,18 @@ HIMAGELIST imlist = (HIMAGELIST)SendMessage(handle, TB_GETIMAGELIST, 0, 0); int minsize = 24; + if(imlist) + ImageList_GetIconSize(imlist, &thiswidth, &thisheight); + /* If we are flat the size can be smaller */ if(GetWindowLong(handle, GWL_STYLE) & TBSTYLE_FLAT) minsize = 20; + else + { + thiswidth += 4; + thisheight += 4; + } - if(imlist) - ImageList_GetIconSize(imlist, &thiswidth, &thisheight); - if(thiswidth < minsize) thiswidth = minsize; if(thisheight < minsize)