Editor: fine tuned the size of the completion images. eric7

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 28 Jul 2021 17:30:35 +0200
branch
eric7
changeset 8487
153b7c3da034
parent 8482
26cd6e5e4087
child 8488
b9168b90f830

Editor: fine tuned the size of the completion images.
(grafted from f511dfc8db962a1c5e976e5f4662afdadba816a7)

eric7/QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/eric7/QScintilla/Editor.py	Wed Jul 28 17:02:33 2021 +0200
+++ b/eric7/QScintilla/Editor.py	Wed Jul 28 17:30:35 2021 +0200
@@ -16,7 +16,7 @@
 
 from PyQt6.QtCore import (
     pyqtSignal, pyqtSlot, Qt, QDir, QTimer, QModelIndex, QFileInfo,
-    QCryptographicHash, QEvent, QDateTime, QPoint
+    QCryptographicHash, QEvent, QDateTime, QPoint, QSize
 )
 from PyQt6.QtGui import QPalette, QFont, QPixmap, QPainter, QActionGroup
 from PyQt6.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