Editor: fine tuned the size of the completion images.

Wed, 28 Jul 2021 17:30:35 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 28 Jul 2021 17:30:35 +0200
changeset 8486
f511dfc8db96
parent 8485
bb395ec2a6af
child 8491
ae1152e8d384

Editor: fine tuned the size of the completion images.

eric6/QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/eric6/QScintilla/Editor.py	Wed Jul 28 17:02:19 2021 +0200
+++ b/eric6/QScintilla/Editor.py	Wed Jul 28 17:30:35 2021 +0200
@@ -16,7 +16,7 @@
 
 from PyQt5.QtCore import (
     pyqtSignal, pyqtSlot, Qt, QDir, QTimer, QModelIndex, QFileInfo,
-    QCryptographicHash, QEvent, QDateTime, QPoint
+    QCryptographicHash, QEvent, QDateTime, QPoint, QSize
 )
 from PyQt5.QtGui import QPalette, QFont, QPixmap, QPainter
 from PyQt5.QtWidgets import (
@@ -585,36 +585,53 @@
         """
         Private method to register images for autocompletion lists.
         """
-        self.registerImage(self.ClassID,
-                           UI.PixmapCache.getPixmap("class"))
-        self.registerImage(self.ClassProtectedID,
-                           UI.PixmapCache.getPixmap("class_protected"))
-        self.registerImage(self.ClassPrivateID,
-                           UI.PixmapCache.getPixmap("class_private"))
-        self.registerImage(self.MethodID,
-                           UI.PixmapCache.getPixmap("method"))
-        self.registerImage(self.MethodProtectedID,
-                           UI.PixmapCache.getPixmap("method_protected"))
-        self.registerImage(self.MethodPrivateID,
-                           UI.PixmapCache.getPixmap("method_private"))
-        self.registerImage(self.AttributeID,
-                           UI.PixmapCache.getPixmap("attribute"))
-        self.registerImage(self.AttributeProtectedID,
-                           UI.PixmapCache.getPixmap("attribute_protected"))
-        self.registerImage(self.AttributePrivateID,
-                           UI.PixmapCache.getPixmap("attribute_private"))
-        self.registerImage(self.EnumID,
-                           UI.PixmapCache.getPixmap("enum"))
-        self.registerImage(self.KeywordsID,
-                           UI.PixmapCache.getPixmap("keywords"))
-        self.registerImage(self.ModuleID,
-                           UI.PixmapCache.getPixmap("module"))
-        
-        self.registerImage(self.FromDocumentID,
-                           UI.PixmapCache.getPixmap("editor"))
-        
-        self.registerImage(self.TemplateImageID,
-                           UI.PixmapCache.getPixmap("templateViewer"))
+        # finale size of the completion images
+        imageSize = QSize(16, 16)
+        
+        self.registerImage(
+            self.ClassID,
+            UI.PixmapCache.getPixmap("class", imageSize))
+        self.registerImage(
+            self.ClassProtectedID,
+            UI.PixmapCache.getPixmap("class_protected", imageSize))
+        self.registerImage(
+            self.ClassPrivateID,
+            UI.PixmapCache.getPixmap("class_private", imageSize))
+        self.registerImage(
+            self.MethodID,
+            UI.PixmapCache.getPixmap("method", imageSize))
+        self.registerImage(
+            self.MethodProtectedID,
+            UI.PixmapCache.getPixmap("method_protected", imageSize))
+        self.registerImage(
+            self.MethodPrivateID,
+            UI.PixmapCache.getPixmap("method_private", imageSize))
+        self.registerImage(
+            self.AttributeID,
+            UI.PixmapCache.getPixmap("attribute", imageSize))
+        self.registerImage(
+            self.AttributeProtectedID,
+            UI.PixmapCache.getPixmap("attribute_protected", imageSize))
+        self.registerImage(
+            self.AttributePrivateID,
+            UI.PixmapCache.getPixmap("attribute_private", imageSize))
+        self.registerImage(
+            self.EnumID,
+            UI.PixmapCache.getPixmap("enum", imageSize))
+        self.registerImage(
+            self.KeywordsID,
+            UI.PixmapCache.getPixmap("keywords", imageSize))
+        self.registerImage(
+            self.ModuleID,
+            UI.PixmapCache.getPixmap("module", imageSize))
+        
+        self.registerImage(
+            self.FromDocumentID,
+            UI.PixmapCache.getPixmap("editor", imageSize))
+        
+        self.registerImage(
+            self.TemplateImageID,
+            UI.PixmapCache.getPixmap("templateViewer", imageSize))
     
     def addClone(self, editor):
         """

eric ide

mercurial