{ "viewerOptions", ArgString, (void *) &appData.viewerOptions, TRUE, (ArgIniType) "-ncp -engineOutputUp false -saveSettingsOnExit false" },
{ "autoCopyPV", ArgBoolean, (void *) &appData.autoCopyPV, TRUE, FALSE },
{ "topLevel", ArgBoolean, (void *) &appData.topLevel, XBOARD, (ArgIniType) TOPLEVEL },
+ { "dialogColor", ArgString, (void *) &appData.dialogColor, XBOARD, (ArgIniType) "" },
+ { "buttonColor", ArgString, (void *) &appData.buttonColor, XBOARD, (ArgIniType) "" },
#if ZIPPY
{ "zippyTalk", ArgBoolean, (void *) &appData.zippyTalk, FALSE, (ArgIniType) ZIPPY_TALK },
Display *xDisplay;
Window xBoardWindow;
Pixel lightSquareColor, darkSquareColor, whitePieceColor, blackPieceColor,
- highlightSquareColor, premoveHighlightColor;
+ highlightSquareColor, premoveHighlightColor, dialogColor, buttonColor;
Pixel lowTimeWarningColor;
GC lightSquareGC, darkSquareGC, lineGC, wdPieceGC, wlPieceGC,
bdPieceGC, blPieceGC, wbPieceGC, bwPieceGC, coordGC, highlineGC,
forceMono |= MakeOneColor(appData.blackPieceColor, &blackPieceColor);
forceMono |= MakeOneColor(appData.highlightSquareColor, &highlightSquareColor);
forceMono |= MakeOneColor(appData.premoveHighlightColor, &premoveHighlightColor);
+ if(appData.dialogColor[0]) MakeOneColor(appData.dialogColor, &dialogColor);
+ if(appData.buttonColor[0]) MakeOneColor(appData.buttonColor, &buttonColor);
return forceMono;
}
// set size (if given)
if(w) XtSetArg(args[j], XtNwidth, w), j++;
if(h) XtSetArg(args[j], XtNheight, h), j++;
+ // color
+ if(!appData.monoMode) {
+ if(!b && appData.dialogColor[0]) XtSetArg(args[j], XtNbackground, dialogColor), j++;
+ if(b == 3 && appData.buttonColor[0]) XtSetArg(args[j], XtNbackground, buttonColor), j++;
+ if(b == 3) b = 1;
+ }
// border
XtSetArg(args[j], XtNborderWidth, b); j++;
return j;
layout =
XtCreateManagedWidget(layoutName, formWidgetClass, popup,
layoutArgs, XtNumber(layoutArgs));
+ if(!appData.monoMode && appData.dialogColor[0]) XtSetArg(args[0], XtNbackground, dialogColor);
+ XtSetValues(layout, args, 1);
+
for(c=0; c<width; c++) {
pane[4] = 'A'+c;
form =
formArgs, XtNumber(formArgs));
j=0;
XtSetArg(args[j], stack ? XtNfromVert : XtNfromHoriz, previousPane); j++;
+ if(!appData.monoMode && appData.dialogColor[0]) XtSetArg(args[j], XtNbackground, dialogColor), j++;
XtSetValues(form, args, j);
lastrow = forelast = NULL;
previousPane = form;
} else {
w = 20; msg = "+"; j = textHeight/2; // spin button
}
- j = SetPositionAndSize(args, last, edit, 1 /* border */,
+ j = SetPositionAndSize(args, last, edit, 3 /* border */,
w /* w */, j /* h */, 0x31 /* chain to right edge */);
edit = XtCreateManagedWidget(msg, commandWidgetClass, form, args, j);
XtAddCallback(edit, XtNcallback, SpinCallback, (XtPointer)(intptr_t) i + 256*dlgNr);
if(option[i].type != Spin) break;
- j = SetPositionAndSize(args, last, edit, 1 /* border */,
+ j = SetPositionAndSize(args, last, edit, 3 /* border */,
20 /* w */, textHeight/2 /* h */, 0x31 /* chain to right edge */);
XtSetArg(args[j], XtNvertDistance, -1); j++;
last = XtCreateManagedWidget("-", commandWidgetClass, form, args, j);
chain = 0x31; // 0011.0001 = both left and right side to right edge
forelast = lastrow;
} else chain = 0, shrink = FALSE;
- j = SetPositionAndSize(args, last, lastrow, 1 /* border */,
+ j = SetPositionAndSize(args, last, lastrow, 3 /* border */,
option[i].max /* w */, shrink ? textHeight : 0 /* h */, chain /* chain */);
XtSetArg(args[j], XtNlabel, _(option[i].name)); j++;
if(option[i].textValue) { // special for buttons of New Variant dialog
}
lastrow = forelast;
} else shrink = FALSE, lastrow = last, last = widest ? widest : dialog;
- j = SetPositionAndSize(args, last, anchor ? anchor : lastrow, 1 /* border */,
+ j = SetPositionAndSize(args, last, anchor ? anchor : lastrow, 3 /* border */,
0 /* w */, shrink ? textHeight : 0 /* h */, 0x37 /* chain: right, bottom and use both neighbors */);
if(!(option[i].min & NO_OK)) {