Index: /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 7433)
+++ /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 7434)
@@ -722,6 +722,6 @@
     // set the smallest and biggest size of the Main frame
     // and move it to its appearance position
-    SetWMSizeHints(570, 480, 2048, 1536, 1, 1);
-    MoveResize(rand()%100+570, rand()%100+480, 570, 480);
+    SetWMSizeHints(571, 480, 2048, 1536, 1, 1);
+    MoveResize(rand()%100+571, rand()%100+480, 570, 480);
 
     //
@@ -1589,25 +1589,26 @@
 
     case kSize640:  
-        Resize(570, 480);
+        Resize(571, 480);
         return kTRUE;
     case kSize768:  
-        Resize(700, 576);
+        Resize(714, 576);
         return kTRUE;
     case kSize800:  
-        Resize(740, 600);
+        Resize(750, 600);
         return kTRUE;
     case kSize960:  
-        Resize(880, 700);
+        Resize(900, 700);
         return kTRUE;
     case kSize1024: 
-        Resize(980, 768);
+        Resize(1000, 768);
         return kTRUE;
     case kSize1152:
-        Resize(1080, 864);
+        Resize(1147, 864);
+        return kTRUE;
     case kSize1280: 
-        Resize(1280, 980);
+        Resize(1321, 980);
         return kTRUE;
     case kSize1400:
-        Resize(1350, 1050);
+        Resize(1426, 1050);
         return kTRUE;
     case kSize1600:
@@ -2533,11 +2534,10 @@
     {
         *fLog << warn << "Sorry, writing image-files is not available in batch mode." << endl;
-        //*fLog << warn << "Sorry, writing gif-files is not available in batch mode." << endl;
         return 0;
     }
 //#endif
 
-    SetStatusLine1("Writing image file... <please be patient>");
-    SetStatusLine2("");
+    SetStatusLine1("Writing image file...");
+    SetStatusLine2("please be patient!");
 
     if (!CheckTabForCanvas(num))
@@ -2634,4 +2634,5 @@
         // deletion
         //
+        TCanvas *n = c;
         //TCanvas *n = (TCanvas*)c->Clone();
         //CanvasSetFillColor(*n, kWhite);
@@ -2655,18 +2656,21 @@
 
 #if ROOT_VERSION_CODE < ROOT_VERSION(4,04,00)
-        c->Draw();
+        n->Draw();
 
         if (type==TImage::kGif)
-            c->SaveAs(writename); // FIXME: Seems not to work well in TImage! (root 3.10/02)
+            n->SaveAs(writename); // FIXME: Seems not to work well in TImage! (root 3.10/02)
         else
         {
             TImage *img = TImage::Create();
-            img->FromPad(c);
+            img->FromPad(n);
             img->WriteImage(writename, type);
             delete img;
         }
 #else
-        c->Print(writename);
+        //gROOT->SetBatch();
+        n->Print(writename);
+        //gROOT->SetBatch(kFALSE);
 #endif
+        // delete n;
         if (num<0)
             *fLog << "done." << endl;
@@ -2753,5 +2757,6 @@
     }
 
-    padsav->cd();
+    if (padsav)
+        padsav->cd();
 
     *fLog << inf << "done." << endl;
@@ -2917,12 +2922,6 @@
     UInt_t h = evt->fHeight;
 
-    /*
-     cout << "Old: " << GetWidth() << " " << GetHeight() << " " << GetBorderWidth() << endl;
-     cout << "New: " << w << " " << h << " ";
-     cout << "New: " << GetDefaultWidth() << " " << GetDefaultHeight() << " " << endl;
-     */
-
-    Bool_t wchanged = w!=GetWidth();
-    Bool_t hchanged = h!=GetHeight();
+    const Bool_t wchanged = w!=GetWidth();
+    const Bool_t hchanged = h!=GetHeight();
 
     if (!wchanged && !hchanged)
@@ -2933,5 +2932,4 @@
     }
 
-
     if (GetWidth()==1 && GetHeight()==1)
         return kTRUE;
@@ -2939,11 +2937,11 @@
     // calculate the constant part of the window
     const UInt_t cw = GetWidth() -fTab->GetWidth();
-    const UInt_t ch = GetHeight()-fTab->GetHeight();
-
-    // calculate new size of frame (canvas @ 1:sqrt(2))
+    const UInt_t ch = GetHeight()-fTab->GetHeight()+fTab->GetTabHeight();
+
+    // calculate new size of frame (canvas @ 2:3)
     if (hchanged)
-        w = (UInt_t)((h-ch)*sqrt(2.)+.5)+cw;
+        w = TMath::Nint((h-ch)*1.5+cw);
     else
-        h = (UInt_t)((w-cw)/sqrt(2.)+.5)+ch;
+        h = TMath::Nint((w-cw)/1.5+ch);
 
     // resize frame
