gui: fix general tab and tooltips

This commit is contained in:
2019-07-14 19:21:19 +02:00
parent ff0d722b0b
commit a54c05e9f7

View File

@@ -497,7 +497,11 @@ class General(ConfigWidget):
self.widgets['cursor_style'] = QtWidgets.QComboBox() self.widgets['cursor_style'] = QtWidgets.QComboBox()
for option in self.cursor_style_options: for option in self.cursor_style_options:
self.widgets['cursor_style'].addItem(option) self.widgets['cursor_style'].addItem(option)
self.widgets['cursor_style'] = config.get('cursor_style') cur = config.get('cursor_style')
if cur in self.cursor_style_options:
self.widgets['cursor_style'].setCurrentIndex(
self.cursor_style_options.index(cur)
)
self.widgets['custom_cursor_colors'] = QtWidgets.QCheckBox() self.widgets['custom_cursor_colors'] = QtWidgets.QCheckBox()
self.widgets['custom_cursor_colors'].setChecked( self.widgets['custom_cursor_colors'].setChecked(
config.get('custom_cursor_colors', False) config.get('custom_cursor_colors', False)
@@ -860,30 +864,31 @@ class Config(QtWidgets.QWidget):
self.tabs = QtWidgets.QTabWidget() self.tabs = QtWidgets.QTabWidget()
self.tabs.addTab(General(self.config), "General") self.tabs.addTab(General(self.config), "General")
self.tabs.setTabToolTip(0, "General")
self.tabs.addTab(Window(self.config.get('window', {})), "Window") self.tabs.addTab(Window(self.config.get('window', {})), "Window")
self.tabs.setTabToolTip(0, "Window") self.tabs.setTabToolTip(1, "Window")
self.tabs.addTab(Font(self.config.get('font', {})), "Font") self.tabs.addTab(Font(self.config.get('font', {})), "Font")
self.tabs.setTabToolTip(1, "Font") self.tabs.setTabToolTip(2, "Font")
self.tabs.addTab(Debug(self.config.get('debug', {})), "Debug") self.tabs.addTab(Debug(self.config.get('debug', {})), "Debug")
self.tabs.setTabToolTip(2, "Debug") self.tabs.setTabToolTip(3, "Debug")
self.tabs.addTab(Env(self.config.get('env', {})), "Env") self.tabs.addTab(Env(self.config.get('env', {})), "Env")
self.tabs.setTabToolTip(3, "Env") self.tabs.setTabToolTip(4, "Env")
self.tabs.addTab(Selection(self.config.get('selection', {})), "Selection") self.tabs.addTab(Selection(self.config.get('selection', {})), "Selection")
self.tabs.setTabToolTip(4, "Selection") self.tabs.setTabToolTip(5, "Selection")
self.tabs.addTab(Shell(self.config.get('shell', {})), "Shell") self.tabs.addTab(Shell(self.config.get('shell', {})), "Shell")
self.tabs.setTabToolTip(5, "Shell") self.tabs.setTabToolTip(6, "Shell")
self.tabs.addTab(Colors(self.config.get('colors', {})), "Colors") self.tabs.addTab(Colors(self.config.get('colors', {})), "Colors")
self.tabs.setTabToolTip(6, "Colors") self.tabs.setTabToolTip(7, "Colors")
self.tabs.addTab(Scrolling(self.config.get('scrolling', {})), "Scrolling") self.tabs.addTab(Scrolling(self.config.get('scrolling', {})), "Scrolling")
self.tabs.setTabToolTip(7, "Scrolling") self.tabs.setTabToolTip(8, "Scrolling")
self.tabs.addTab( self.tabs.addTab(
KeyBindings(self.config.get('key_bindings', [])), "Key Bindings" KeyBindings(self.config.get('key_bindings', [])), "Key Bindings"
) )
self.tabs.setTabToolTip(8, "Key Bindings") self.tabs.setTabToolTip(9, "Key Bindings")
self.tabs.addTab( self.tabs.addTab(
MouseBindings(self.config.get('mouse_bindings', [])), "Mouse Bindings" MouseBindings(self.config.get('mouse_bindings', [])), "Mouse Bindings"
) )
self.tabs.setTabToolTip(9, "Mouse Bindings") self.tabs.setTabToolTip(10, "Mouse Bindings")
self.layout.addWidget(self.tabs) self.layout.addWidget(self.tabs)