dualOptions[3].max = dualOptions[2].max = size; // board width
dualOptions[0].max = dualOptions[1].max = size/2 - 3; // clock width
GenericPopUp(dualOptions, "XBoard", DummyDlg, BoardWindow, NONMODAL, 1);
+ SlaveResize(dualOptions+3);
}
void
void SetWindowTitle P((char *text, char *title, char *icon));
void SetupDropMenu P((void));
Option *BoardPopUp P((int squareSize, int lineGap, void *clockFontThingy));
+void SlaveResize P((Option *opt));
int SetCurrentComboSelection P((Option *opt));
void BoxAutoPopUp P((char *buf));
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)
{
if(len) buf[len] = NULLCHAR, printf("%s\n", buf);
}
+void
+SlaveResize (Option *opt)
+{
+}
+
int
main (int argc, char **argv)
{