changeset 737:9b37def27afe

Updated the AboutDialogGraphicsView to show correctly on Mac and set the window focus back to the main window after closing the dialog. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1014 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Sun, 19 Sep 2010 12:21:24 +0000
parents 1109652dbb56
children e05fd24c4417
files src/AboutDialogGraphicsView.cpp
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/AboutDialogGraphicsView.cpp	Sun Sep 19 11:29:57 2010 +0000
+++ b/src/AboutDialogGraphicsView.cpp	Sun Sep 19 12:21:24 2010 +0000
@@ -50,7 +50,7 @@
     scene = new QGraphicsScene(this);
     setSceneRect( newGeometry );
     aboutDialogAsSplashScreen = new QSplashScreen(this);
-    aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
+    //aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
     graphicsProxyWidget = scene->addWidget(aboutDialogAsSplashScreen);
     graphicsProxyWidget->setWindowFlags( Qt::ToolTip );
 
@@ -98,6 +98,7 @@
 
     aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
     graphicsProxyWidget->setGeometry( aboutDialog->geometry() );
+    aboutDialog->hide();
     if ( firstRunOfAnimation ) {
         graphicsProxyWidget->setPos( parent->geometry().x()+(parent->geometry().width()-graphicsProxyWidget->geometry().width()) / 2, parent->y()+windowTitleBarWidth);
     }
@@ -155,8 +156,8 @@
     \brief Does not directly hide the AboutDialog but instead starts the "fade out" 3D animation.
  */
 void AboutDialogGraphicsView::hide() {
-    aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
-    graphicsProxyWidget->setGeometry( aboutDialog->geometry() );
+    //aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(aboutDialog) );
+    //graphicsProxyWidget->setGeometry( aboutDialog->geometry() );
     //if ( firstRunOfAnimation ) {
     firstRunOfAnimation = false;
     //    graphicsProxyWidget->setPos( parent->geometry().x()+(parent->geometry().width()-graphicsProxyWidget->geometry().width()) / 2, parent->y());
@@ -190,6 +191,7 @@
 void AboutDialogGraphicsView::hideReally() {
     disconnect(timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
     QGraphicsView::hide();
+    parent->activateWindow();
 }