X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=4793a1d4272e74df35efb32ac7288a260860d00c;hb=8397d76a8208a09ba3722754c04a2fddaf04713a;hp=99f55664dcd097ab2b4bed0e2b44d7993f5f552c;hpb=4f14a66c2fb16a1985418ba9af56f0cee0495f28;p=xboard.git diff --git a/xboard.c b/xboard.c index 99f5566..4793a1d 100644 --- a/xboard.c +++ b/xboard.c @@ -2568,15 +2568,6 @@ main(argc, argv) /* TODO hide button bar if requested */ } - /* - * gtk set properties of widgets - */ - - /* set board size */ - gtk_widget_set_size_request(GTK_WIDGET(GUI_Board), - boardWidth,boardHeight); - - /* end gtk set properties of widgets */ if (appData.titleInWindow) { @@ -2706,25 +2697,7 @@ main(argc, argv) /* realize window */ gtk_widget_show (GUI_Window); - /* do resizing to a fixed aspect ratio */ - { - GtkRequisition w; - int totalh=boardHeight; - float ratio; - - gtk_widget_size_request(GTK_WIDGET(GUI_Menubar), &w); - totalh += w.height; - - gtk_widget_size_request(GTK_WIDGET(GUI_Timer), &w); - totalh += w.height; - - gtk_widget_size_request(GTK_WIDGET(GUI_Buttonbar), &w); - totalh += w.height; - - ratio = (totalh)/(boardWidth) ; - GUI_SetAspectRatio(ratio); - } - + /* recalc boardsize */ CreateGCs(); CreatePieces(); CreatePieceMenus(); @@ -3120,17 +3093,29 @@ void CreateGCs() void CreatePieces() { - /* order of pieces - WhitePawn, WhiteKnight, WhiteBishop, WhiteRook, WhiteQueen, WhiteKing, - BlackPawn, BlackKnight, BlackBishop, BlackRook, BlackQueen, BlackKing, - */ int i; + /* free if used + for(i=0;i