From: H.G. Muller Date: Fri, 6 May 2011 20:37:14 +0000 (+0200) Subject: Improve sizing of comment and tags dialogs X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e7b4c63691a7608892a85a85f4fb424f2c2637b5;p=xboard.git Improve sizing of comment and tags dialogs There seems to be a bug in Xaw for the sizing of buttons; they get unpredicatble and weird sizes when the size is not explicitly set, possibly stretching the initial width of a dialog to rediculous values. Sizing back to a remembered value from the settings file then makes buttons overlapand text edits shrink to almost nothing. To prevent that we now define exlicit sizes for the buttons in tags and comment popups. --- diff --git a/xoptions.c b/xoptions.c index dedda96..3ea1195 100644 --- a/xoptions.c +++ b/xoptions.c @@ -1860,9 +1860,9 @@ void SaveChanges(int n) } Option commentOptions[] = { -{ 0xD, 200, 300, NULL, (void*) &commentText, "", NULL, TextBox, "" }, -{ 0, 0, 0, NULL, (void*) &ClearComment, NULL, NULL, Button, "clear" }, -{ 0, 1, 0, NULL, (void*) &SaveChanges, NULL, NULL, Button, "save changes" }, +{ 0xD, 200, 250, NULL, (void*) &commentText, "", NULL, TextBox, "" }, +{ 0, 0, 50, NULL, (void*) &ClearComment, NULL, NULL, Button, "clear" }, +{ 0, 1, 100, NULL, (void*) &SaveChanges, NULL, NULL, Button, "save changes" }, { 0, 1, 0, NULL, (void*) &NewComCallback, "", NULL, EndMark , "" } }; @@ -1907,8 +1907,8 @@ void changeTags(int n) Option tagsOptions[] = { { 0, 0, 0, NULL, NULL, NULL, NULL, Label, "" }, -{ 0xD, 200, 250, NULL, (void*) &tagsText, "", NULL, TextBox, "" }, -{ 0, 0, 0, NULL, (void*) &changeTags, NULL, NULL, Button, "save changes" }, +{ 0xD, 200, 200, NULL, (void*) &tagsText, "", NULL, TextBox, "" }, +{ 0, 0, 100, NULL, (void*) &changeTags, NULL, NULL, Button, "save changes" }, { 0, 1, 0, NULL, (void*) &NewTagsCallback, "", NULL, EndMark , "" } };