Ignore:
Timestamp:
11/28/05 11:31:46 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r7349 r7434  
    722722    // set the smallest and biggest size of the Main frame
    723723    // and move it to its appearance position
    724     SetWMSizeHints(570, 480, 2048, 1536, 1, 1);
    725     MoveResize(rand()%100+570, rand()%100+480, 570, 480);
     724    SetWMSizeHints(571, 480, 2048, 1536, 1, 1);
     725    MoveResize(rand()%100+571, rand()%100+480, 570, 480);
    726726
    727727    //
     
    15891589
    15901590    case kSize640: 
    1591         Resize(570, 480);
     1591        Resize(571, 480);
    15921592        return kTRUE;
    15931593    case kSize768: 
    1594         Resize(700, 576);
     1594        Resize(714, 576);
    15951595        return kTRUE;
    15961596    case kSize800: 
    1597         Resize(740, 600);
     1597        Resize(750, 600);
    15981598        return kTRUE;
    15991599    case kSize960: 
    1600         Resize(880, 700);
     1600        Resize(900, 700);
    16011601        return kTRUE;
    16021602    case kSize1024:
    1603         Resize(980, 768);
     1603        Resize(1000, 768);
    16041604        return kTRUE;
    16051605    case kSize1152:
    1606         Resize(1080, 864);
     1606        Resize(1147, 864);
     1607        return kTRUE;
    16071608    case kSize1280:
    1608         Resize(1280, 980);
     1609        Resize(1321, 980);
    16091610        return kTRUE;
    16101611    case kSize1400:
    1611         Resize(1350, 1050);
     1612        Resize(1426, 1050);
    16121613        return kTRUE;
    16131614    case kSize1600:
     
    25332534    {
    25342535        *fLog << warn << "Sorry, writing image-files is not available in batch mode." << endl;
    2535         //*fLog << warn << "Sorry, writing gif-files is not available in batch mode." << endl;
    25362536        return 0;
    25372537    }
    25382538//#endif
    25392539
    2540     SetStatusLine1("Writing image file... <please be patient>");
    2541     SetStatusLine2("");
     2540    SetStatusLine1("Writing image file...");
     2541    SetStatusLine2("please be patient!");
    25422542
    25432543    if (!CheckTabForCanvas(num))
     
    26342634        // deletion
    26352635        //
     2636        TCanvas *n = c;
    26362637        //TCanvas *n = (TCanvas*)c->Clone();
    26372638        //CanvasSetFillColor(*n, kWhite);
     
    26552656
    26562657#if ROOT_VERSION_CODE < ROOT_VERSION(4,04,00)
    2657         c->Draw();
     2658        n->Draw();
    26582659
    26592660        if (type==TImage::kGif)
    2660             c->SaveAs(writename); // FIXME: Seems not to work well in TImage! (root 3.10/02)
     2661            n->SaveAs(writename); // FIXME: Seems not to work well in TImage! (root 3.10/02)
    26612662        else
    26622663        {
    26632664            TImage *img = TImage::Create();
    2664             img->FromPad(c);
     2665            img->FromPad(n);
    26652666            img->WriteImage(writename, type);
    26662667            delete img;
    26672668        }
    26682669#else
    2669         c->Print(writename);
     2670        //gROOT->SetBatch();
     2671        n->Print(writename);
     2672        //gROOT->SetBatch(kFALSE);
    26702673#endif
     2674        // delete n;
    26712675        if (num<0)
    26722676            *fLog << "done." << endl;
     
    27532757    }
    27542758
    2755     padsav->cd();
     2759    if (padsav)
     2760        padsav->cd();
    27562761
    27572762    *fLog << inf << "done." << endl;
     
    29172922    UInt_t h = evt->fHeight;
    29182923
    2919     /*
    2920      cout << "Old: " << GetWidth() << " " << GetHeight() << " " << GetBorderWidth() << endl;
    2921      cout << "New: " << w << " " << h << " ";
    2922      cout << "New: " << GetDefaultWidth() << " " << GetDefaultHeight() << " " << endl;
    2923      */
    2924 
    2925     Bool_t wchanged = w!=GetWidth();
    2926     Bool_t hchanged = h!=GetHeight();
     2924    const Bool_t wchanged = w!=GetWidth();
     2925    const Bool_t hchanged = h!=GetHeight();
    29272926
    29282927    if (!wchanged && !hchanged)
     
    29332932    }
    29342933
    2935 
    29362934    if (GetWidth()==1 && GetHeight()==1)
    29372935        return kTRUE;
     
    29392937    // calculate the constant part of the window
    29402938    const UInt_t cw = GetWidth() -fTab->GetWidth();
    2941     const UInt_t ch = GetHeight()-fTab->GetHeight();
    2942 
    2943     // calculate new size of frame (canvas @ 1:sqrt(2))
     2939    const UInt_t ch = GetHeight()-fTab->GetHeight()+fTab->GetTabHeight();
     2940
     2941    // calculate new size of frame (canvas @ 2:3)
    29442942    if (hchanged)
    2945         w = (UInt_t)((h-ch)*sqrt(2.)+.5)+cw;
     2943        w = TMath::Nint((h-ch)*1.5+cw);
    29462944    else
    2947         h = (UInt_t)((w-cw)/sqrt(2.)+.5)+ch;
     2945        h = TMath::Nint((w-cw)/1.5+ch);
    29482946
    29492947    // resize frame
Note: See TracChangeset for help on using the changeset viewer.