X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxboard.c;h=a5b015c045532382fdcdf86acc1adbf5a011b9ed;hb=49254d2c6abc5586805adb5186172fabefcad7d9;hp=e4c62c4a438373b8d457d4dedc06d16d0a5e1f0d;hpb=204df43a817c927d4db73f81cd4b4ce5075def6b;p=xboard.git diff --git a/gtk/xboard.c b/gtk/xboard.c index e4c62c4..a5b015c 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -691,6 +691,21 @@ PrintOptions () if(len) buf[len] = NULLCHAR, printf("%s\n", buf); } +void +SlaveResize (Option *opt) +{ + static int slaveW, slaveH, w, h; + GtkAllocation a; + if(!slaveH) { + gtk_widget_get_allocation(shells[DummyDlg], &a); + w = a.width; h = a.height; + gtk_widget_get_allocation(opt->handle, &a); + slaveW = w - opt->max; // [HGM] needed to set new shellWidget size when we resize board + slaveH = h - a.height + 13; + } + gtk_window_resize(GTK_WINDOW(shells[DummyDlg]), slaveW + opt->max, slaveH + opt->value); +} + int main (int argc, char **argv) {