diff --git a/build_tools/requirements.txt b/build_tools/requirements.txt index 91f85fd0d0..d7a1f8cdd1 100644 --- a/build_tools/requirements.txt +++ b/build_tools/requirements.txt @@ -14,7 +14,7 @@ lxml mako matplotlib numba -numpy==1.26.4 +numpy==1.26.4 # 2.0.0 deprecates many functions used in the codebase (and potentially in dependencies) periodictable pybind11 pylint diff --git a/installers/sasview.spec b/installers/sasview.spec index f19ebcbf7c..63e5c398c0 100644 --- a/installers/sasview.spec +++ b/installers/sasview.spec @@ -11,6 +11,7 @@ PYTHON_PACKAGES = sysconfig.get_path('platlib') datas = [ ('../src/sas/qtgui/images', 'images'), + ('../src/sas/qtgui/images', "sas/qtgui/images"), ('../src/sas/sasview/media', 'media'), ('../src/sas/example_data', 'example_data'), ('../src/sas/sascalc/calculator/ausaxs/lib', 'sas/sascalc/calculator/ausaxs/lib'), diff --git a/src/sas/qtgui/MainWindow/MainWindow.py b/src/sas/qtgui/MainWindow/MainWindow.py index 3eb19234bc..260315aa49 100644 --- a/src/sas/qtgui/MainWindow/MainWindow.py +++ b/src/sas/qtgui/MainWindow/MainWindow.py @@ -11,6 +11,8 @@ from PySide6.QtGui import QPixmap, QGuiApplication, QCursor from PySide6.QtCore import Qt, QTimer +from importlib import resources + # Local UI from sas.qtgui.UI import main_resources_rc from .UI.MainWindowUI import Ui_SasView @@ -57,12 +59,16 @@ def SplashScreen(): Displays splash screen as soon as humanely possible. The screen will disappear as soon as the event loop starts. """ - pixmap_path = "images/SVwelcome_mini.png" - if os.path.splitext(sys.argv[0])[1].lower() == ".py": - pixmap_path = "src/sas/qtgui/images/SVwelcome_mini.png" - pixmap = QPixmap(pixmap_path) - splashScreen = QSplashScreen(pixmap) - return splashScreen + + with resources.open_binary("sas.qtgui.images", "SVwelcome_mini.png") as file: + image_data = file.read() + + pixmap = QPixmap() + pixmap.loadFromData(image_data) + + splashScreen = QSplashScreen(pixmap) + + return splashScreen def get_highdpi_scaling(): return 1.0 diff --git a/src/sas/qtgui/Perspectives/Fitting/media/ball.ico b/src/sas/qtgui/Perspectives/Fitting/media/ball.ico index b62ed66502..67ac75beeb 100755 Binary files a/src/sas/qtgui/Perspectives/Fitting/media/ball.ico and b/src/sas/qtgui/Perspectives/Fitting/media/ball.ico differ diff --git a/src/sas/qtgui/UI/res/SVwelcome.png b/src/sas/qtgui/UI/res/SVwelcome.png index 407605d6b9..27d389c7e9 100755 Binary files a/src/sas/qtgui/UI/res/SVwelcome.png and b/src/sas/qtgui/UI/res/SVwelcome.png differ diff --git a/src/sas/qtgui/UI/res/ball.ico b/src/sas/qtgui/UI/res/ball.ico index b62ed66502..67ac75beeb 100755 Binary files a/src/sas/qtgui/UI/res/ball.ico and b/src/sas/qtgui/UI/res/ball.ico differ diff --git a/src/sas/qtgui/images/SVwelcome.png b/src/sas/qtgui/images/SVwelcome.png index 407605d6b9..27d389c7e9 100755 Binary files a/src/sas/qtgui/images/SVwelcome.png and b/src/sas/qtgui/images/SVwelcome.png differ diff --git a/src/sas/qtgui/images/SVwelcome_mini.png b/src/sas/qtgui/images/SVwelcome_mini.png index 86fb9216e3..f2ca8e0536 100755 Binary files a/src/sas/qtgui/images/SVwelcome_mini.png and b/src/sas/qtgui/images/SVwelcome_mini.png differ diff --git a/src/sas/qtgui/images/ball.icns b/src/sas/qtgui/images/ball.icns index 552c0c37a6..bfbdbe33b1 100755 Binary files a/src/sas/qtgui/images/ball.icns and b/src/sas/qtgui/images/ball.icns differ diff --git a/src/sas/qtgui/images/ball.ico b/src/sas/qtgui/images/ball.ico index b62ed66502..67ac75beeb 100755 Binary files a/src/sas/qtgui/images/ball.ico and b/src/sas/qtgui/images/ball.ico differ diff --git a/src/sas/qtgui/images/icons/ball.icns b/src/sas/qtgui/images/icons/ball.icns index 552c0c37a6..bfbdbe33b1 100755 Binary files a/src/sas/qtgui/images/icons/ball.icns and b/src/sas/qtgui/images/icons/ball.icns differ diff --git a/src/sas/qtgui/images/icons/ball.ico b/src/sas/qtgui/images/icons/ball.ico index b62ed66502..67ac75beeb 100755 Binary files a/src/sas/qtgui/images/icons/ball.ico and b/src/sas/qtgui/images/icons/ball.ico differ diff --git a/src/sas/system/config/config.py b/src/sas/system/config/config.py index 6df87db0bb..83d90274d2 100644 --- a/src/sas/system/config/config.py +++ b/src/sas/system/config/config.py @@ -219,4 +219,4 @@ def __init__(self): -config = Config() \ No newline at end of file +config = Config()