eric7/EricWidgets/EricApplication.py

branch
eric7
changeset 8880
4b631598f752
parent 8864
4a0f7105dbd8
child 8881
54e42bc2437a
--- a/eric7/EricWidgets/EricApplication.py	Wed Dec 29 17:54:06 2021 +0100
+++ b/eric7/EricWidgets/EricApplication.py	Wed Dec 29 19:40:16 2021 +0100
@@ -180,14 +180,18 @@
         
         return self.__pluginObjectRegistry[name][1]
     
-    def getStyleIconsPath(self):
+    def getStyleIconsPath(self, universal=False):
         """
         Public method to get the path for the style icons.
         
+        @param universal flag indicating a universal file path (defaults to
+            False)
+        @type bool (optional)
         @return directory path containing the style icons
         @rtype str
         """
         import Preferences
+        import Utilities
         from eric7config import getConfig
         
         styleIconsPath = Preferences.getUI("StyleIconsPath")
@@ -197,7 +201,10 @@
             styleIconsPath = os.path.join(
                 getConfig('ericIconDir'), "StyleIcons")
         
-        return styleIconsPath
+        if universal:
+            return Utilities.fromNativeSeparators(styleIconsPath)
+        else:
+            return styleIconsPath
     
     def setStyleSheetFile(self, filename):
         """
@@ -226,9 +233,9 @@
             styleSheet = ""
         
         if styleSheet:
-            # preprocess the style sheet to replace the placeholder for the
+            # pre-process the style sheet to replace the placeholder for the
             # path to the icons
-            styleIconsPath = self.getStyleIconsPath()
+            styleIconsPath = self.getStyleIconsPath(universal=True)
             styleSheet = styleSheet.replace("${path}", styleIconsPath)
         
         if "QPalette {" in styleSheet:

eric ide

mercurial