Corrected the background color handling in the highlighter styles configuration page. eric7

Sun, 09 Jan 2022 16:29:04 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 09 Jan 2022 16:29:04 +0100
branch
eric7
changeset 8912
1bd5e972252e
parent 8911
a37761d36236
child 8913
6fcb81c39205

Corrected the background color handling in the highlighter styles configuration page.

eric7/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py file | annotate | diff | comparison | revisions
--- a/eric7/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py	Sun Jan 09 16:28:16 2022 +0100
+++ b/eric7/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py	Sun Jan 09 16:29:04 2022 +0100
@@ -280,8 +280,8 @@
             self.__styleSample(colour, paper)
             for selItem in self.styleElementList.selectedItems():
                 style, substyle = self.__stylesForItem(selItem)
-                self.lexer.setPaper(colour, style, substyle)
-                selItem.setBackground(0, colour)
+                self.lexer.setPaper(paper, style, substyle)
+                selItem.setBackground(0, paper)
     
     @pyqtSlot()
     def on_allBackgroundColoursButton_clicked(self):
@@ -290,15 +290,15 @@
         selected lexer.
         """
         style, substyle = self.__currentStyles()
-        colour = QColorDialog.getColor(self.lexer.paper(style, substyle))
-        if colour.isValid():
-            paper = self.lexer.paper(style, substyle)
+        paper = QColorDialog.getColor(self.lexer.paper(style, substyle))
+        if paper.isValid():
+            colour = self.lexer.color(style, substyle)
             self.__styleSample(colour, paper)
             
             itm = self.styleElementList.topLevelItem(0)
             while itm is not None:
                 style, substyle = self.__stylesForItem(itm)
-                self.lexer.setPaper(colour, style, substyle)
+                self.lexer.setPaper(paper, style, substyle)
                 itm = self.styleElementList.itemBelow(itm)
             self.__styleAllItems()
     

eric ide

mercurial