Added a default 'Text Document' icon for the status bar file type field and the language selection menu.

Tue, 03 Apr 2018 17:54:42 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 03 Apr 2018 17:54:42 +0200
changeset 6210
f5b392aac28e
parent 6209
05b9989c1977
child 6211
4f0e08c95ca9

Added a default 'Text Document' icon for the status bar file type field and the language selection menu.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
ViewManager/ViewManager.py file | annotate | diff | comparison | revisions
icons/default/fileText.png file | annotate | diff | comparison | revisions
--- a/QScintilla/Editor.py	Mon Apr 02 14:06:55 2018 +0200
+++ b/QScintilla/Editor.py	Tue Apr 03 17:54:42 2018 +0200
@@ -1008,7 +1008,9 @@
         menu = QMenu(self.tr("Languages"))
         
         self.languagesActGrp = QActionGroup(self)
-        self.noLanguageAct = menu.addAction(self.tr("No Language"))
+        self.noLanguageAct = menu.addAction(
+            UI.PixmapCache.getIcon("fileText.png"),
+            self.tr("No Language"))
         self.noLanguageAct.setCheckable(True)
         self.noLanguageAct.setData("None")
         self.languagesActGrp.addAction(self.noLanguageAct)
--- a/ViewManager/ViewManager.py	Mon Apr 02 14:06:55 2018 +0200
+++ b/ViewManager/ViewManager.py	Tue Apr 03 17:54:42 2018 +0200
@@ -4853,9 +4853,12 @@
         self.sbEnc.setText(encoding)
         
         if language is None:
-            language = ''
-        import QScintilla.Lexers
-        pixmap = QScintilla.Lexers.getLanguageIcon(language, True)
+            pixmap = QPixmap()
+        elif language == "":
+            pixmap = UI.PixmapCache.getPixmap("fileText.png")
+        else:
+            import QScintilla.Lexers
+            pixmap = QScintilla.Lexers.getLanguageIcon(language, True)
         self.sbLang.setPixmap(pixmap)
         if pixmap.isNull():
             self.sbLang.setText(language)
Binary file icons/default/fileText.png has changed

eric ide

mercurial