From a10b865af2acab1a9e4994947cd605e96b196af2 Mon Sep 17 00:00:00 2001 From: rokuster <47361670+rokuster@users.noreply.github.com> Date: Tue, 5 Feb 2019 17:55:13 +0100 Subject: [PATCH] Fix Images Display Issues - Replace relative Add-On Image Path with full file uri in StartPage.js file - Fix a missing absolute file path - Fix a duplicated data folder entry in the Resourcepath --- src/Mod/Start/StartPage/StartPage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 2c3ae918a4..e308a49ffc 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -361,6 +361,9 @@ def handle(): HTML = HTML.replace("IMAGE_SRC_POWERHUB",'file:///'+os.path.join(resources_dir, 'images/poweruserhub.png')) HTML = HTML.replace("IMAGE_SRC_DEVHUB",'file:///'+os.path.join(resources_dir, 'images/developerhub.png')) HTML = HTML.replace("IMAGE_SRC_MANUAL",'file:///'+os.path.join(resources_dir, 'images/manual.png')) + imagepath= 'file:///'+os.path.join(resources_dir, 'images/installed.png') + imagepath = imagepath.replace('\\','/') # replace Windows backslash with slash to make the path javascript compatible + HTML = HTML.replace("IMAGE_SRC_INSTALLED",imagepath) # build UL_WORKBENCHES @@ -401,7 +404,7 @@ def handle(): if wb in iconbank: img = iconbank[wb] else: - img = os.path.join(FreeCAD.getResourceDir(),"data","Mod",wn,"Resources","icons",wn+"Workbench.svg") + img = os.path.join(FreeCAD.getResourceDir(),"Mod",wn,"Resources","icons",wn+"Workbench.svg") if not os.path.exists(img): w = FreeCADGui.listWorkbenches()[wb] if hasattr(w,"Icon"): @@ -416,7 +419,7 @@ def handle(): else: img = xpm else: - img="images/freecad.png" + img = os.path.join(resources_dir,"images/freecad.png") iconbank[wb] = img UL_WORKBENCHES += '