Exemple #1
0
    def loadSettings(self):
        super(TerminalSettingsWidget, self).loadSettings()
        self.setTitle("Terminal")
        self.setIcon(self.application().resources().get_icon("settings-terminal"))
        defaultScheme = self.settings().get("default_scheme")

        for index, scheme in enumerate(ColorScheme.SCHEMES):
            self.comboBoxScheme.addItem(scheme.name)
            if defaultScheme == scheme.name:
                self.comboBoxScheme.setCurrentIndex(index)

        editorTheme = self.settings().get("editor_theme", False)
        self.checkBoxEditorTheme.setChecked(editorTheme)
        self.comboBoxScheme.setDisabled(editorTheme)

        # Font
        default_font = self.settings().get("default_font")
        font = QtGui.QFont(*default_font)
        self.fontComboBoxName.setCurrentFont(font)
        self.spinBoxFontSize.setValue(default_font[1])
        self.checkBoxAntialias.setChecked(test_font_strategy(font, QtGui.QFont.PreferAntialias))

        self.checkBoxSynchronize.setChecked(self.settings().get("synchronize_editor"))
        self.spinBoxBufferSize.setValue(self.settings().get("buffer_size"))

        # Connect font signals
        self.checkBoxAntialias.stateChanged[int].connect(self.setDefaultFontSetting)
        self.checkBoxEditorTheme.stateChanged[int].connect(self.setEditorThemeSetting)
        self.checkBoxSynchronize.stateChanged[int].connect(self.setSynchronizeEditorSetting)
        self.spinBoxFontSize.valueChanged[int].connect(self.setDefaultFontSetting)
        self.fontComboBoxName.activated.connect(self.setDefaultFontSetting)
Exemple #2
0
    def loadSettings(self):
        super(ThemeSettingsWidget, self).loadSettings()
        self.setTitle("Appearance")
        self.setIcon(self.application().resources().get_icon("settings-theme"))

        # Set models
        self.comboBoxThemes.setModel(self.application().supportManager.themeProxyModel)
        self.tableViewStyles.setModel(self.application().supportManager.themeStyleProxyModel)
        
        theme_uuid = self.settings().get('default_theme')
        if theme_uuid is not None:
            default_theme = self.application().supportManager.getTheme(theme_uuid)
            if default_theme is not None:
                self.updateUi(default_theme)
        
        # Font
        default_font = self.settings().get('default_font')
        if default_font is not None:
            font = QtGui.QFont(*default_font)
            self.fontComboBoxName.setCurrentFont(font)
            self.spinBoxFontSize.setValue(default_font[1])
            self.checkBoxAntialias.setChecked(test_font_strategy(font, QtGui.QFont.PreferAntialias))
        
        # Connect font signals
        self.checkBoxAntialias.stateChanged.connect(self.setDefaultFontSetting)
        self.spinBoxFontSize.valueChanged[int].connect(self.setDefaultFontSetting)
        self.fontComboBoxName.activated.connect(self.setDefaultFontSetting)
Exemple #3
0
    def loadSettings(self):
        super(TerminalSettingsWidget, self).loadSettings()
        defaultScheme = self.settings.value('defaultScheme')
        
        for index, scheme in enumerate(ColorScheme.SCHEMES):
            self.comboBoxScheme.addItem(scheme.name)
            if defaultScheme == scheme.name:
                self.comboBoxScheme.setCurrentIndex(index)
        
        editorTheme = self.settings.value('editorTheme')
        self.checkBoxEditorTheme.setChecked(editorTheme)
        self.comboBoxScheme.setDisabled(editorTheme)

        # Font
        defaultFont = self.settings.value('defaultFont')
        self.fontComboBoxName.setCurrentFont(defaultFont)
        self.spinBoxFontSize.setValue(defaultFont.pointSize())
        self.checkBoxAntialias.setChecked(test_font_strategy(defaultFont, QtGui.QFont.PreferAntialias))
        
        self.checkBoxSynchronize.setChecked(self.settings.value('synchronizeEditor'))
        self.spinBoxBufferSize.setValue(self.settings.value('bufferSize'))
        
        # Connect font signals
        self.checkBoxAntialias.stateChanged[int].connect(self.setDefaultFontSetting)
        self.checkBoxEditorTheme.stateChanged[int].connect(self.setEditorThemeSetting)
        self.checkBoxSynchronize.stateChanged[int].connect(self.setSynchronizeEditorSetting)
        self.spinBoxFontSize.valueChanged[int].connect(self.setDefaultFontSetting)
        self.fontComboBoxName.activated.connect(self.setDefaultFontSetting)