Skip to content

Commit

Permalink
Move login into a func, re #23814
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitar Tasev committed Nov 13, 2018
1 parent a7213dc commit b5a87f9
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions qt/applications/workbench/workbench/app/mainwindow.py
Expand Up @@ -84,14 +84,18 @@ def qapplication():
from workbench.app.resources import qCleanupResources # noqa

atexit.register(qCleanupResources)
width = QApplication.desktop().availableGeometry().width()

if width > 2048:
SPLASH = QSplashScreen(QPixmap(':/images/MantidSplashScreen_4k.jpg'),
Qt.WindowStaysOnTopHint)
else:
SPLASH = QSplashScreen(QPixmap(':/images/MantidSplashScreen.png'),
Qt.WindowStaysOnTopHint)


def _get_splash_image_name():
width = QApplication.desktop().availableGeometry().width()
if width > 2048:
return ':/images/MantidSplashScreen_4k.jpg'
else:
return ':/images/MantidSplashScreen.png'


SPLASH = QSplashScreen(QPixmap(_get_splash_image_name()),
Qt.WindowStaysOnTopHint)
SPLASH.show()
SPLASH.showMessage("Starting...", Qt.AlignBottom | Qt.AlignLeft
| Qt.AlignAbsolute, QColor(Qt.black))
Expand Down

0 comments on commit b5a87f9

Please sign in to comment.