gtk_widget_get_allocation(shellWidget, &a);
marginW = a.width - bw;
gtk_widget_get_allocation(optList[W_WHITE].handle, &a);
+ gtk_widget_set_size_request(optList[W_BOARD].handle, w, h); // protect board widget
w += marginW + 1; // [HGM] not sure why the +1 is (sometimes) needed...
h += marginH + a.height + 1;
gtk_window_resize(GTK_WINDOW(shellWidget), w, h);
+ gtk_widget_set_size_request(optList[W_BOARD].handle, -1, -1); // liberate board again
}
int
break;
case Graph:
option[i].handle = (void*) (graph = gtk_drawing_area_new());
-// gtk_widget_set_size_request(graph, option[i].max, option[i].value);
+ gtk_widget_set_size_request(graph, option[i].max, option[i].value);
if(0){ GtkAllocation a;
a.x = 0; a.y = 0; a.width = option[i].max, a.height = option[i].value;
gtk_widget_set_allocation(graph, &a);
gtk_window_resize(GTK_WINDOW(dialog), wp[dlgNr]->width, wp[dlgNr]->height);
}
+ for(i=0; option[i].type != EndMark; i++) if(option[i].type == Graph)
+ gtk_widget_set_size_request(option[i].handle, -1, -1); // remove size requests after realization, so user can shrink
+
return 1; // tells caller he must do initialization (e.g. add specific event handlers)
}