示例#1
0
    def set_dark_style(self):
        f = QFile(Resource.darkstyle)

        if not f.exists():
            LOGGER.error(
                "Unable to load dark stylesheet, file not found in resources")
            return
        else:
            f.open(QFile.ReadOnly | QFile.Text)
            ts = QTextStream(f)
            stylesheet = ts.readAll()

            self.setStyleSheet(stylesheet)
            KnechtSettings.app['app_style'] = 'fusion-dark'
            IconRsc.update_icons(self.ui)

            self.setStyle('Fusion')
示例#2
0
 def set_default_style(self):
     self.setStyleSheet(None)
     KnechtSettings.app['app_style'] = 'windowsvista'
     IconRsc.update_icons(self.ui)
     self.setStyle('windowsvista')