eric6/WebBrowser/UrlBar/UrlBar.py

changeset 7567
bb196e51827d
parent 7565
928373562e36
child 7570
a7a5750aded4
--- a/eric6/WebBrowser/UrlBar/UrlBar.py	Sun May 03 09:36:15 2020 +0200
+++ b/eric6/WebBrowser/UrlBar/UrlBar.py	Sun May 03 10:26:40 2020 +0200
@@ -221,12 +221,12 @@
         
         @param evt reference to the paint event (QPaintEvent)
         """
+        foregroundColor = QApplication.palette().color(QPalette.Text)
+        
         if self.__privateMode:
-            backgroundColor = QColor(220, 220, 220)     # light gray
-            foregroundColor = Qt.black
+            backgroundColor = Preferences.getWebBrowser("PrivateModeUrlColor")
         else:
             backgroundColor = QApplication.palette().color(QPalette.Base)
-            foregroundColor = QApplication.palette().color(QPalette.Text)
         
         if self.__browser is not None:
             p = self.palette()
@@ -234,18 +234,17 @@
             
             if not self.__browser.getSafeBrowsingStatus():
                 # malicious web site
-                # TODO: make this color configurable
-                backgroundColor = QColor(170, 0, 0)
-                foregroundColor = QColor(Qt.white)
+                backgroundColor = Preferences.getWebBrowser(
+                        "MaliciousUrlColor")
             elif self.__browser.url().scheme() == "https":
                 if WebBrowserWindow.networkManager().isInsecureHost(
                     self.__browser.url().host()
                 ):
-                    # TODO: make this color configurable
-                    backgroundColor = QColor(170, 170, 0)
+                    backgroundColor = Preferences.getWebBrowser(
+                        "InsecureUrlColor")
                 else:
                     backgroundColor = Preferences.getWebBrowser(
-                        "SaveUrlColor")
+                        "SecureUrlColor")
             
             if progress == 0 or progress == 100:
                 p.setBrush(QPalette.Base, backgroundColor)

eric ide

mercurial