src/eric7/UI/PixmapCache.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
--- a/src/eric7/UI/PixmapCache.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/UI/PixmapCache.py	Wed Jul 13 14:55:47 2022 +0200
@@ -17,8 +17,9 @@
     """
     Class implementing a pixmap cache for icons.
     """
+
     SupportedExtensions = [".svgz", ".svg", ".png"]
-    
+
     def __init__(self):
         """
         Constructor
@@ -40,11 +41,10 @@
         if key:
             basename, ext = os.path.splitext(key)
             if size and not size.isEmpty():
-                key = "{0}_{1}_{2}".format(
-                    basename, size.width(), size.height())
+                key = "{0}_{1}_{2}".format(basename, size.width(), size.height())
             else:
                 key = basename
-            
+
             try:
                 return self.pixmapCache[key]
             except KeyError:
@@ -64,32 +64,33 @@
                         break
                 else:
                     pm = QPixmap()
-                
+
                 self.pixmapCache[key] = pm
                 return self.pixmapCache[key]
-        
+
         return QPixmap()
 
     def addSearchPath(self, path):
         """
         Public method to add a path to the search path.
-        
+
         @param path path to add
         @type str
         """
         if path not in self.searchPath:
             self.searchPath.append(path)
-    
+
     def removeSearchPath(self, path):
         """
         Public method to remove a path from the search path.
-        
+
         @param path path to remove
         @type str
         """
         if path in self.searchPath:
             self.searchPath.remove(path)
 
+
 pixCache = PixmapCache()
 
 
@@ -197,7 +198,7 @@
 def removeSearchPath(path, cache=pixCache):
     """
     Public method to remove a path from the search path.
-    
+
     @param path path to remove
     @type str
     @param cache reference to the pixmap cache object

eric ide

mercurial