From f0d845c8781d4f4fea73ce830b5de7c115638d30 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sat, 23 Feb 2008 12:59:43 +0000 Subject: [PATCH] Use resize() to resize windows. set_default_size() doesn't work on the root window, since it has already been presented, and set_size_request() prevents the user from reducing the window's size. Also, wait until the size and position are set before presenting the window. git-svn-id: http://svn.voria.com/code@1808 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/app.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 27a7373..587b996 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -1371,9 +1371,6 @@ App::set_recent_file_window_size(etl::handle instance) continue; } - CanvasView::Handle canvasview = instance->find_canvas_view(canvas); - canvasview->present(); - if (canvas->is_root()) seen_root = true; else @@ -1399,14 +1396,14 @@ App::set_recent_file_window_size(etl::handle instance) x += atoi(getenv("SYNFIG_WINDOW_POSITION_X_OFFSET")); if(getenv("SYNFIG_WINDOW_POSITION_Y_OFFSET")) y += atoi(getenv("SYNFIG_WINDOW_POSITION_Y_OFFSET")); - canvasview->move(x,y); if (w > SCALE_FACTOR) w = 150; if (w < 0) w = 0; if (h > SCALE_FACTOR) h = 150; if (h < 0) h = 0; - w=w*screen_w/SCALE_FACTOR; - h=h*screen_h/SCALE_FACTOR; - canvasview->set_default_size(w,h); - canvasview->set_size_request(w,h); + + CanvasView::Handle canvasview = instance->find_canvas_view(canvas); + canvasview->move(x,y); + canvasview->resize(w*screen_w/SCALE_FACTOR,h*screen_h/SCALE_FACTOR); + canvasview->present(); current = separator+1; } -- 2.7.4