Browse Source

More icon search paths

master
Nils 4 years ago
parent
commit
3e8b0a3132
  1. 10
      qtgui/mainwindow.py

10
qtgui/mainwindow.py

@ -118,6 +118,13 @@ 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)
logger.info(f"Program icons path: {QtGui.QIcon.themeSearchPaths()}, {QtGui.QIcon.fallbackSearchPaths()}, {QtGui.QIcon.fallbackThemeName()}")
#Set up the user interface from Designer and other widgets
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
@ -129,7 +136,7 @@ class MainWindow(QtWidgets.QMainWindow):
#TODO: Hide information tab until the feature is ready
self.ui.tabbyCat.removeTab(2)
self.programIcons = {} #executableName:QIcon. Filled by self.updateProgramDatabase
self.programIcons = {} #executableName:QIcon. Filled by self._updateGUIWithCachedPrograms which calls _updateIcons
self.sessionController = SessionController(mainWindow=self)
self.systemTray = SystemTray(mainWindow=self)
self.connectMenu()
@ -224,6 +231,7 @@ class MainWindow(QtWidgets.QMainWindow):
def _updateIcons(self):
logger.info("Creating icon database")
programs = api.getSystemPrograms()
self.programIcons.clear()
for entry in programs:
exe = entry["argodejoExec"]

Loading…
Cancel
Save