File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1919# You should have received a copy of the GNU General Public License
2020# along with this program. If not, see <http://www.gnu.org/licenses/>
2121
22+ import os
2223from PyQt5 .QtWidgets import QDialog
2324from MLC .GUI .Autogenerated .autogenerated import Ui_MLCAboutDialog
2425
@@ -46,13 +47,17 @@ class MLCAboutDialog(QDialog):
4647 </div>
4748 <br>
4849 <br>
49- """ % "2 .0"
50+ """ % "3 .0"
5051
5152 def __init__ (self , board_path , parent = None ):
5253 super (MLCAboutDialog , self ).__init__ (parent )
54+ icon_path = os .path .join (* [os .path .dirname (os .path .abspath (__file__ )),
55+ "images" ,
56+ "mlc_icon.png" ])
57+
5358 self .ui = Ui_MLCAboutDialog ()
5459 self .ui .setupUi (self )
55- self .ui .mlcimage .setStyleSheet ("image: url(images/mlc_icon.png );" )
60+ self .ui .mlcimage .setStyleSheet ("image: url({0} );" . format ( icon_path ) )
5661 self .ui .labelabout .setText (self .MLC_ABOUT )
5762 self .resize (600 , 500 )
5863 self .setFixedSize (600 , 500 )
Original file line number Diff line number Diff line change 2121
2222import os
2323import sys
24- sys .path .append (os .path .abspath ("." ) + "/../.." )
24+ mlc_gui_dir = os .path .dirname (os .path .abspath (__file__ ))
25+ root_dir = os .path .join (* [mlc_gui_dir , ".." , ".." ])
26+ sys .path .append (root_dir )
27+
2528
2629import ConfigParser
2730import tarfile
3033
3134from MLC .api .MLCLocal import MLCLocal
3235from MLC .api .MLCLocal import DuplicatedExperimentError
33- from MLC .GUI .ExperimentsManager import ExperimentsManager
3436from MLC .GUI .Autogenerated .autogenerated import Ui_MLCManager
3537from MLC .GUI .Autogenerated .autogenerated import Ui_PropertiesDialog
36- from MLC .GUI .Experiment . MLCAboutDialog import MLCAboutDialog
38+ from MLC .GUI .ExperimentsManager import ExperimentsManager
3739from MLC .GUI .Experiment .ExperimentWindow import ExperimentWindow
40+ from MLC .GUI .MLCAboutDialog import MLCAboutDialog
3841from MLC .GUI .Tables .ConfigParserTableModel import ConfigParserTableModel
3942from MLC .Log .log import get_gui_logger
4043
5659
5760
5861class MLC_GUI (QMainWindow ):
59- MLC_ICON_FILE = "./ images/ mlc_icon.png"
60- GUI_CONFIG_FILE = "./. mlc_gui.conf"
62+ MLC_ICON_FILE = os . path . join ( * [ mlc_gui_dir , " images" , " mlc_icon.png"])
63+ GUI_CONFIG_FILE = os . path . join ( mlc_gui_dir , ". mlc_gui.conf")
6164 WEBSERVICE_PORT = 5000
6265 experiment_closed = pyqtSignal (['QString' ])
6366
You can’t perform that action at this time.
0 commit comments