229 p = self.palette() |
229 p = self.palette() |
230 progress = self.__browser.progress() |
230 progress = self.__browser.progress() |
231 if progress == 0: |
231 if progress == 0: |
232 if self.__browser.url().scheme() == "https": |
232 if self.__browser.url().scheme() == "https": |
233 backgroundColor = Preferences.getHelp("SaveUrlColor") |
233 backgroundColor = Preferences.getHelp("SaveUrlColor") |
234 p.setBrush(QPalette.Base, backgroundColor); |
234 p.setBrush(QPalette.Base, backgroundColor) |
235 p.setBrush(QPalette.Text, foregroundColor); |
235 p.setBrush(QPalette.Text, foregroundColor) |
236 else: |
236 else: |
237 if self.__browser.url().scheme() == "https": |
237 if self.__browser.url().scheme() == "https": |
238 backgroundColor = Preferences.getHelp("SaveUrlColor") |
238 backgroundColor = Preferences.getHelp("SaveUrlColor") |
239 highlight = QApplication.palette().color(QPalette.Highlight) |
239 highlight = QApplication.palette().color(QPalette.Highlight) |
240 r = (highlight.red() + 2 * backgroundColor.red()) // 3 |
240 r = (highlight.red() + 2 * backgroundColor.red()) // 3 |