diff -r 39e3ed0bc0c6 -r 1696e91a5393 eric6/Toolbox/Startup.py --- a/eric6/Toolbox/Startup.py Wed Apr 01 19:50:41 2020 +0200 +++ b/eric6/Toolbox/Startup.py Fri Apr 03 17:43:01 2020 +0200 @@ -12,7 +12,6 @@ import sys from PyQt5.QtCore import QTranslator, QLocale, QLibraryInfo, QDir -from PyQt5.QtGui import QPalette from PyQt5.QtWidgets import QApplication from E5Gui.E5Application import E5Application @@ -119,19 +118,17 @@ """ Module function to initialize the default mime source factory. - @param application reference to the application objetc - @type QGuiApplication + @param application reference to the application object + @type E5Application """ import Preferences - palette = application.palette() - lightness = palette.color(QPalette.Window).lightness() - if lightness > 128: + if application.usesDarkPalette(): + # dark desktop + iconPath = "breeze-dark" + else: # light desktop iconPath = "breeze" - else: - # dark desktop - iconPath = "breeze-dark" defaultIconPaths = [ # add paths for vector graphics os.path.join(getConfig('ericIconDir'), iconPath),