Changeset 1181 for trunk/source/visualization/OpenGL
- Timestamp:
- Nov 17, 2009, 7:32:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r1164 r1181 119 119 G4Qt* interactorManager = G4Qt::getInstance (); 120 120 121 ResizeWindow(fVP.GetWindowSizeHintX(),fVP.GetWindowSizeHintY()); 122 121 123 // FIXME L.Garnier 9/11/09 Has to be check !!! 122 124 // Qt UI with Qt Vis … … 127 129 128 130 // return false if G4UIQt was not launch 129 bool res = interactorManager->AddTabVisWidget(fWindow,name );131 bool res = interactorManager->AddTabVisWidget(fWindow,name,getWinWidth(),getWinHeight()); 130 132 131 133 if (!res) { // we have to do a dialog … … 169 171 fGLWindow->setLayout(mainLayout); 170 172 #endif 173 174 175 //useful for MACOSX, we have to compt the menuBar height 176 int offset = QApplication::desktop()->height() 177 - QApplication::desktop()->availableGeometry().height(); 178 179 G4int YPos= fVP.GetWindowAbsoluteLocationHintY(QApplication::desktop()->height()); 180 if (fVP.GetWindowAbsoluteLocationHintY(QApplication::desktop()->height())< offset) { 181 YPos = offset; 182 } 183 fGLWindow->resize(getWinWidth(), getWinHeight()); 184 #ifdef G4DEBUG_VIS_OGL 185 printf("G4OpenGLQtViewer::CreateMainWindow :: resizing to %d %d \n",getWinWidth(), getWinHeight()); 186 #endif 187 fGLWindow->move(fVP.GetWindowAbsoluteLocationHintX(QApplication::desktop()->width()),YPos); 188 fGLWindow->show(); 171 189 } else { 172 190 fGLWindow = fWindow; … … 174 192 175 193 176 ResizeWindow(fVP.GetWindowSizeHintX(),fVP.GetWindowSizeHintY());177 178 //useful for MACOSX, we have to compt the menuBar height179 int offset = QApplication::desktop()->height()180 - QApplication::desktop()->availableGeometry().height();181 182 G4int YPos= fVP.GetWindowAbsoluteLocationHintY(QApplication::desktop()->height());183 if (fVP.GetWindowAbsoluteLocationHintY(QApplication::desktop()->height())< offset) {184 YPos = offset;185 }186 fGLWindow->resize(getWinWidth(), getWinHeight());187 fGLWindow->move(fVP.GetWindowAbsoluteLocationHintX(QApplication::desktop()->width()),YPos);188 fGLWindow->show();189 194 190 195 if(!fWindow) return;
Note: See TracChangeset
for help on using the changeset viewer.