Changeset 7434 for trunk/MagicSoft
- Timestamp:
- 11/28/05 11:31:46 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r7349 r7434 722 722 // set the smallest and biggest size of the Main frame 723 723 // and move it to its appearance position 724 SetWMSizeHints(57 0, 480, 2048, 1536, 1, 1);725 MoveResize(rand()%100+57 0, rand()%100+480, 570, 480);724 SetWMSizeHints(571, 480, 2048, 1536, 1, 1); 725 MoveResize(rand()%100+571, rand()%100+480, 570, 480); 726 726 727 727 // … … 1589 1589 1590 1590 case kSize640: 1591 Resize(57 0, 480);1591 Resize(571, 480); 1592 1592 return kTRUE; 1593 1593 case kSize768: 1594 Resize(7 00, 576);1594 Resize(714, 576); 1595 1595 return kTRUE; 1596 1596 case kSize800: 1597 Resize(7 40, 600);1597 Resize(750, 600); 1598 1598 return kTRUE; 1599 1599 case kSize960: 1600 Resize( 880, 700);1600 Resize(900, 700); 1601 1601 return kTRUE; 1602 1602 case kSize1024: 1603 Resize( 980, 768);1603 Resize(1000, 768); 1604 1604 return kTRUE; 1605 1605 case kSize1152: 1606 Resize(1080, 864); 1606 Resize(1147, 864); 1607 return kTRUE; 1607 1608 case kSize1280: 1608 Resize(1 280, 980);1609 Resize(1321, 980); 1609 1610 return kTRUE; 1610 1611 case kSize1400: 1611 Resize(1 350, 1050);1612 Resize(1426, 1050); 1612 1613 return kTRUE; 1613 1614 case kSize1600: … … 2533 2534 { 2534 2535 *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;2536 2536 return 0; 2537 2537 } 2538 2538 //#endif 2539 2539 2540 SetStatusLine1("Writing image file... <please be patient>");2541 SetStatusLine2(" ");2540 SetStatusLine1("Writing image file..."); 2541 SetStatusLine2("please be patient!"); 2542 2542 2543 2543 if (!CheckTabForCanvas(num)) … … 2634 2634 // deletion 2635 2635 // 2636 TCanvas *n = c; 2636 2637 //TCanvas *n = (TCanvas*)c->Clone(); 2637 2638 //CanvasSetFillColor(*n, kWhite); … … 2655 2656 2656 2657 #if ROOT_VERSION_CODE < ROOT_VERSION(4,04,00) 2657 c->Draw();2658 n->Draw(); 2658 2659 2659 2660 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) 2661 2662 else 2662 2663 { 2663 2664 TImage *img = TImage::Create(); 2664 img->FromPad( c);2665 img->FromPad(n); 2665 2666 img->WriteImage(writename, type); 2666 2667 delete img; 2667 2668 } 2668 2669 #else 2669 c->Print(writename); 2670 //gROOT->SetBatch(); 2671 n->Print(writename); 2672 //gROOT->SetBatch(kFALSE); 2670 2673 #endif 2674 // delete n; 2671 2675 if (num<0) 2672 2676 *fLog << "done." << endl; … … 2753 2757 } 2754 2758 2755 padsav->cd(); 2759 if (padsav) 2760 padsav->cd(); 2756 2761 2757 2762 *fLog << inf << "done." << endl; … … 2917 2922 UInt_t h = evt->fHeight; 2918 2923 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(); 2927 2926 2928 2927 if (!wchanged && !hchanged) … … 2933 2932 } 2934 2933 2935 2936 2934 if (GetWidth()==1 && GetHeight()==1) 2937 2935 return kTRUE; … … 2939 2937 // calculate the constant part of the window 2940 2938 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) 2944 2942 if (hchanged) 2945 w = (UInt_t)((h-ch)*sqrt(2.)+.5)+cw;2943 w = TMath::Nint((h-ch)*1.5+cw); 2946 2944 else 2947 h = (UInt_t)((w-cw)/sqrt(2.)+.5)+ch;2945 h = TMath::Nint((w-cw)/1.5+ch); 2948 2946 2949 2947 // resize frame
Note:
See TracChangeset
for help on using the changeset viewer.