Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version of splash screen and icon #2920

Merged
merged 15 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_tools/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions installers/sasview.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
18 changes: 12 additions & 6 deletions src/sas/qtgui/MainWindow/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Binary file modified src/sas/qtgui/Perspectives/Fitting/media/ball.ico
Binary file not shown.
Binary file modified src/sas/qtgui/UI/res/SVwelcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/sas/qtgui/UI/res/ball.ico
Binary file not shown.
Binary file modified src/sas/qtgui/images/SVwelcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/sas/qtgui/images/SVwelcome_mini.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/sas/qtgui/images/ball.icns
Binary file not shown.
Binary file modified src/sas/qtgui/images/ball.ico
Binary file not shown.
Binary file modified src/sas/qtgui/images/icons/ball.icns
Binary file not shown.
Binary file modified src/sas/qtgui/images/icons/ball.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion src/sas/system/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ def __init__(self):



config = Config()
config = Config()
Loading