# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1326394590 0 # Node ID 2827274226988304b07d95bc188ddd79ad460a58 # Parent b7136c130a6643d658ee0b6e1b84b29bc93a5529 Default scrolled items to 500x200 on GTK2. diff -r b7136c130a66 -r 282727422698 gtk/dw.c --- a/gtk/dw.c Thu Jan 12 18:50:17 2012 +0000 +++ b/gtk/dw.c Thu Jan 12 18:56:30 2012 +0000 @@ -10115,7 +10115,21 @@ gtk_container_forall(GTK_CONTAINER(box),_rearrange_table, GINT_TO_POINTER(boxtype == DW_VERT ? index : -(index+1))); gtk_table_attach(GTK_TABLE(box), item, x, x + 1, y, y + 1, hsize ? DW_EXPAND : 0, vsize ? DW_EXPAND : 0, pad, pad); gtk_object_set_data(GTK_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount + 1)); - gtk_widget_set_usize(item, width, height); + { + int thiswidth = width, thisheight = height; + + /* If it is a scrolled item and not expandable... + * set the default size to 500x200. + */ + if(GTK_IS_SCROLLED_WINDOW(item)) + { + if(thiswidth < 1 && !hsize) + thiswidth = 500; + if(thisheight < 1 && !vsize) + thisheight = 200; + } + gtk_widget_set_usize(item, thiswidth, thisheight); + } if(GTK_IS_RADIO_BUTTON(item)) { GSList *group;