eric7/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py

branch
eric7
changeset 8912
1bd5e972252e
parent 8881
54e42bc2437a
child 9152
8a68afaf1ba2
--- 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