mirror of https://gitlab.com/pamhyr/pamhyr2
Results, Plots: Fix icon paths.
parent
45f020edaa
commit
83aa6a5791
|
|
@ -16,9 +16,10 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import logging
|
||||
from datetime import datetime
|
||||
|
||||
from datetime import datetime
|
||||
from tools import trace, timer
|
||||
|
||||
from View.Tools.PamhyrWindow import PamhyrWindow
|
||||
|
|
@ -69,6 +70,14 @@ class ResultsWindow(PamhyrWindow):
|
|||
_pamhyr_ui = "Results"
|
||||
_pamhyr_name = "Results"
|
||||
|
||||
def _path_file(self, filename):
|
||||
return os.path.abspath(
|
||||
os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
"..", "..", filename
|
||||
)
|
||||
)
|
||||
|
||||
def __init__(self, study=None, config=None,
|
||||
solver=None, results=None,
|
||||
parent=None):
|
||||
|
|
@ -124,13 +133,15 @@ class ResultsWindow(PamhyrWindow):
|
|||
self._slider_time.setMaximum(len(self._timestamps) - 1)
|
||||
self._slider_time.setValue(len(self._timestamps) - 1)
|
||||
|
||||
file_path = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
self._icon_start = QIcon()
|
||||
self._icon_start.addPixmap(
|
||||
QPixmap('./src/View/ui/ressources/media-playback-start.png')
|
||||
QPixmap(f'{file_path}/../ui/ressources/media-playback-start.png')
|
||||
)
|
||||
self._icon_pause = QIcon()
|
||||
self._icon_pause.addPixmap(
|
||||
QPixmap('./src/View/ui/ressources/media-playback-pause.png')
|
||||
QPixmap(f'{file_path}/../ui/ressources/media-playback-pause.png')
|
||||
)
|
||||
self._button_play = self.find(QPushButton, f"playButton")
|
||||
self._button_play.setIcon(self._icon_start)
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class PamhyrPlotToolbar(NavigationToolbar2QT):
|
|||
|
||||
icon_zoom = QtGui.QIcon()
|
||||
icon_zoom.addPixmap(QtGui.QPixmap(
|
||||
os.path.abspath(f"{file_path}/../ui/ressources/zoom.png")
|
||||
os.path.abspath(f"{file_path}/../../ui/ressources/zoom.png")
|
||||
))
|
||||
|
||||
icons.append(("zoom", icon_zoom))
|
||||
|
|
@ -122,7 +122,7 @@ class PamhyrPlotToolbar(NavigationToolbar2QT):
|
|||
icon_btn_isometric_view.addPixmap(
|
||||
QtGui.QPixmap(
|
||||
os.path.abspath(
|
||||
f"{file_path}/../ui/ressources/zoom_fit_11.png"
|
||||
f"{file_path}/../../ui/ressources/zoom_fit_11.png"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
@ -131,7 +131,7 @@ class PamhyrPlotToolbar(NavigationToolbar2QT):
|
|||
icon_btn_global_view.addPixmap(
|
||||
QtGui.QPixmap(
|
||||
os.path.abspath(
|
||||
f"{file_path}/../ui/ressources/zoom_fit.png"
|
||||
f"{file_path}/../../ui/ressources/zoom_fit.png"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue