From: H.G.Muller Date: Wed, 6 Apr 2016 07:38:56 +0000 (+0200) Subject: Fix explosion of clocks for large board size GTK X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=3bd0288f93aab3a5ff3aec2eecc98ca2fa007898;p=xboard.git Fix explosion of clocks for large board size GTK When packing things in a hbox for getting them on the same row, the hbox was made vertically expandable when the height of the first element was requested > 80 (assuming it would be a text memo). At square sizes > 81 the logos would require a height > 80, though, and would be the first element on the logo + clocks row. This would make them expandable, so that the window height would be equally divided between board and logos (which again would leave preciously little for the board). Now the expandability is reserved for TextBox Options only. --- diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 79e5617..7ae3f3f 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1392,7 +1392,7 @@ if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width); GtkAttachOptions x = GTK_FILL; // make sure hbox is always available when we have more options on same row hbox = gtk_hbox_new (option[i].type == Button && option[i].textValue || option[i].type == Graph, 0); - if(!currentCps && option[i].value > 80) x |= GTK_EXPAND; // only vertically extended widgets should size vertically + if(!currentCps && option[i].value > 80 && option[i].type == TextBox) x |= GTK_EXPAND; // only vertically extended widgets should size vertically if (strcmp(option[i].name, "") == 0 || option[i].type == Label || option[i].type == Button) // for Label and Button name is contained inside option gtk_table_attach(GTK_TABLE(table), hbox, left, left+r, top, top+1, GTK_FILL | GTK_EXPAND, x, 2, 1);