X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=callback.c;h=c8a97bfcb2bb401a15d6d423f55a86008fbdfb11;hb=52950958d0291eb2b2167319f5863a43f2795669;hp=9abeca0fa5d44f00243f2fbf93199287aa8585d1;hpb=31fcc3f34eacc04811cbfc3165a5e839aa81f015;p=xboard.git diff --git a/callback.c b/callback.c index 9abeca0..c8a97bf 100644 --- a/callback.c +++ b/callback.c @@ -60,12 +60,13 @@ ExposeProc(object, user_data) gtk_widget_size_request(GTK_WIDGET(GUI_Buttonbar), &w); totalh += w.height; - ratio = (totalh+boardHeight)/(boardWidth) ; + ratio = ((float)totalh+boardHeight)/((float)boardWidth) ; gtk_widget_set_size_request(GTK_WIDGET(GUI_Board), boardWidth,boardHeight); - GUI_SetAspectRatio(ratio); + gtk_aspect_frame_set (GTK_ASPECT_FRAME(GUI_Aspect),0,0,ratio,TRUE); + /* recreate pieces with new size... TODO: keep svg in memory and just recreate pixmap instead of reloading files */ CreatePieces(); }