def on_rbLightStyle_clicked(self, checked): app = QtGui.QApplication.instance() if checked: app.setStyleSheet("") self.editorStyle = pyqode.core.QGenericCodeEdit().style self.homePageColorScheme = 0 s = Settings() s.appStyle = constants.WHITE_STYLE
def on_rbDarkStyle_clicked(self, checked): app = QtGui.QApplication.instance() if checked: app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False)) style = self.editorStyle style.setValue("pygmentsStyle", "monokai") style.setValue("selectionBackground", "monokai") style.setValue("background", QtGui.QColor("#272822")) style.setValue("caretLineBackground", QtGui.QColor("#272822")) style.setValue("selectionBackground", QtGui.QColor("#353d44")) style.setValue("whiteSpaceForeground", QtGui.QColor("#393939")) style.setValue("nativeFoldingIndicator", False) self.homePageColorScheme = 1 # force grid refresh self.editorStyle = style s = Settings() s.appStyle = constants.DARK_STYLE