QScintilla/Editor.py

branch
maintenance
changeset 5730
6422afc7adc4
parent 5680
b93cb6353cc0
parent 5706
59458b006d76
child 5752
1860eca908e4
--- a/QScintilla/Editor.py	Sun Apr 09 16:52:55 2017 +0200
+++ b/QScintilla/Editor.py	Sat May 06 13:43:21 2017 +0200
@@ -271,31 +271,32 @@
         self.__changeMarkerUnsaved = self.markerDefine(
             self.__createChangeMarkerPixmap(
                 "OnlineChangeTraceMarkerUnsaved"))
-        self.breakpoint = \
-            self.markerDefine(UI.PixmapCache.getPixmap("break.png"))
-        self.cbreakpoint = \
-            self.markerDefine(UI.PixmapCache.getPixmap("cBreak.png"))
-        self.tbreakpoint = \
-            self.markerDefine(UI.PixmapCache.getPixmap("tBreak.png"))
-        self.tcbreakpoint = \
-            self.markerDefine(UI.PixmapCache.getPixmap("tCBreak.png"))
-        self.dbreakpoint = \
-            self.markerDefine(UI.PixmapCache.getPixmap("breakDisabled.png"))
-        self.bookmark = \
-            self.markerDefine(UI.PixmapCache.getPixmap("bookmark16.png"))
-        self.syntaxerror = \
-            self.markerDefine(UI.PixmapCache.getPixmap("syntaxError.png"))
-        self.notcovered = \
-            self.markerDefine(UI.PixmapCache.getPixmap("notcovered.png"))
-        self.taskmarker = \
-            self.markerDefine(UI.PixmapCache.getPixmap("task.png"))
-        self.warning = \
-            self.markerDefine(UI.PixmapCache.getPixmap("warning.png"))
+        self.breakpoint = self.markerDefine(
+            UI.PixmapCache.getPixmap("break.png"))
+        self.cbreakpoint = self.markerDefine(
+            UI.PixmapCache.getPixmap("cBreak.png"))
+        self.tbreakpoint = self.markerDefine(
+            UI.PixmapCache.getPixmap("tBreak.png"))
+        self.tcbreakpoint = self.markerDefine(
+            UI.PixmapCache.getPixmap("tCBreak.png"))
+        self.dbreakpoint = self.markerDefine(
+            UI.PixmapCache.getPixmap("breakDisabled.png"))
+        self.bookmark = self.markerDefine(
+            UI.PixmapCache.getPixmap("bookmark16.png"))
+        self.syntaxerror = self.markerDefine(
+            UI.PixmapCache.getPixmap("syntaxError.png"))
+        self.notcovered = self.markerDefine(
+            UI.PixmapCache.getPixmap("notcovered.png"))
+        self.taskmarker = self.markerDefine(
+            UI.PixmapCache.getPixmap("task.png"))
+        self.warning = self.markerDefine(
+            UI.PixmapCache.getPixmap("warning.png"))
         
         # define the line markers
-        self.currentline = self.markerDefine(QsciScintilla.Background)
-        self.errorline = self.markerDefine(QsciScintilla.Background)
-        self.__setLineMarkerColours()
+        self.currentline = self.markerDefine(
+            UI.PixmapCache.getPixmap("currentLineMarker.png"))
+        self.errorline = self.markerDefine(
+            UI.PixmapCache.getPixmap("errorLineMarker.png"))
         
         self.breakpointMask = (1 << self.breakpoint) | \
                               (1 << self.cbreakpoint) | \
@@ -4007,9 +4008,6 @@
         if QSCINTILLA_VERSION() >= 0x020301:
             self.__unifiedMargins = Preferences.getEditor("UnifiedMargins")
         
-        # set the line marker colours
-        self.__setLineMarkerColours()
-        
         # set the text display
         self.__setTextDisplay()
         
@@ -4069,19 +4067,6 @@
         
         self.settingsRead.emit()
     
-    def __setLineMarkerColours(self):
-        """
-        Private method to set the line marker colours.
-        """
-        self.setMarkerForegroundColor(
-            Preferences.getEditorColour("CurrentMarker"), self.currentline)
-        self.setMarkerBackgroundColor(
-            Preferences.getEditorColour("CurrentMarker"), self.currentline)
-        self.setMarkerForegroundColor(
-            Preferences.getEditorColour("ErrorMarker"), self.errorline)
-        self.setMarkerBackgroundColor(
-            Preferences.getEditorColour("ErrorMarker"), self.errorline)
-        
     def __setMarginsDisplay(self):
         """
         Private method to configure margins 0 and 2.
@@ -4139,9 +4124,7 @@
                            (1 << self.cbreakpoint) | \
                            (1 << self.tbreakpoint) | \
                            (1 << self.tcbreakpoint) | \
-                           (1 << self.dbreakpoint) | \
-                           (1 << self.currentline) | \
-                           (1 << self.errorline)
+                           (1 << self.dbreakpoint)
             self.setMarginWidth(self.__bpMargin, 16)
             self.setMarginSensitivity(self.__bpMargin, True)
             self.setMarginMarkerMask(self.__bpMargin, marginBpMask)
@@ -4151,7 +4134,9 @@
                               (1 << self.taskmarker) | \
                               (1 << self.warning) | \
                               (1 << self.__changeMarkerUnsaved) | \
-                              (1 << self.__changeMarkerSaved)
+                              (1 << self.__changeMarkerSaved) | \
+                              (1 << self.currentline) | \
+                              (1 << self.errorline)
             self.setMarginWidth(self.__indicMargin, 16)
             self.setMarginSensitivity(self.__indicMargin, True)
             self.setMarginMarkerMask(self.__indicMargin, marginIndicMask)

eric ide

mercurial