From: H.G. Muller Date: Sat, 11 Feb 2012 13:43:53 +0000 (+0100) Subject: Fix heigth of multi-line labels X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=bcdf6260239c66ceee05bec5d637ba12f882e058;p=xboard.git Fix heigth of multi-line labels The previous height patch overlooked that some labels are multi-line, and need more height. --- diff --git a/xoptions.c b/xoptions.c index d640e62..eb64dce 100644 --- a/xoptions.c +++ b/xoptions.c @@ -1155,17 +1155,6 @@ GenericPopUp (Option *option, char *title, int dlgNr) break; case CheckBox: if(!currentCps) option[i].value = *(Boolean*)option[i].target; -#if 0 - j=0; // space holder - XtSetArg(args[j], XtNfromVert, last); j++; - XtSetArg(args[j], XtNwidth, 10); j++; - XtSetArg(args[j], XtNheight, textHeight-22); j++; - XtSetArg(args[j], XtNleft, XtChainLeft); j++; - XtSetArg(args[j], XtNright, XtChainLeft); j++; - XtSetArg(args[j], XtNborderWidth, 0); j++; - if(textHeight < 24) dialog = last; else - dialog = XtCreateManagedWidget(" ", labelWidgetClass, form, args, j); -#endif j=0; XtSetArg(args[j], XtNfromVert, last); j++; XtSetArg(args[j], XtNvertDistance, (textHeight+2)/4 + 3); j++; @@ -1183,7 +1172,7 @@ GenericPopUp (Option *option, char *title, int dlgNr) j=0; XtSetArg(args[j], XtNfromVert, last); j++; XtSetArg(args[j], XtNfromHoriz, option[i].type != Label ? dialog : NULL); j++; - XtSetArg(args[j], XtNheight, textHeight); j++; + if(option[i].type != Label) XtSetArg(args[j], XtNheight, textHeight), j++; XtSetArg(args[j], XtNleft, XtChainLeft); j++; XtSetArg(args[j], XtNborderWidth, 0); j++; XtSetArg(args[j], XtNjustify, XtJustifyLeft); j++;