Browse Source

Try to make sure program icons get found

master
Nils 4 years ago
parent
commit
8122034618
  1. 12
      qtgui/mainwindow.py

12
qtgui/mainwindow.py

@ -118,12 +118,14 @@ class MainWindow(QtWidgets.QMainWindow):
self.qtApp.setApplicationDisplayName(f"{METADATA['name']}")
logger.info("Init MainWindow")
QtGui.QIcon.setFallbackThemeName("hicolor") #only one, not a list
iconPaths = QtGui.QIcon.themeSearchPaths()
iconPaths += ["/usr/share/icons/hicolor", "/usr/share/pixmaps"]
QtGui.QIcon.setThemeSearchPaths(iconPaths)
QtGui.QIcon.setThemeName("hicolor") #audio applications can be found here. We have no need for other icons.
#QtGui.QIcon.setFallbackThemeName("hicolor") #only one, not a list. This is the fallback if the theme can't be found. Not if icons can't be found in a theme.
#iconPaths = QtGui.QIcon.themeSearchPaths()
#iconPaths += ["/usr/share/icons/hicolor", "/usr/share/pixmaps"]
#QtGui.QIcon.setThemeSearchPaths(iconPaths)
logger.info(f"Program icons path: {QtGui.QIcon.themeSearchPaths()}, {QtGui.QIcon.fallbackSearchPaths()}, {QtGui.QIcon.fallbackThemeName()}")
logger.info(f"Program icons path: {QtGui.QIcon.themeSearchPaths()}, {QtGui.QIcon.fallbackSearchPaths()}, {QtGui.QIcon.themeName()}, {QtGui.QIcon.fallbackThemeName()}")
#Set up the user interface from Designer and other widgets
self.ui = Ui_MainWindow()

Loading…
Cancel
Save