diff --git a/README.md b/README.md index bf688d6ecfa..e1beddce140 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,7 @@ a Python version greater than 2.7 or 3.4 (Python <=3.3 is no longer supported). * **Cloudpickle**: Serialize variables in the IPython kernel to send to Spyder. * **spyder-kernels** 1.0+: Jupyter kernels for the Spyder console. * **keyring**: Save Github credentials to report errors securely. +* **QDarkStyle**: A dark stylesheet for Qt applications, used for Spyder's dark theme. * **pexpect**/**paramiko**: Connect to remote kernels through SSH. ### Optional dependencies diff --git a/appveyor.yml b/appveyor.yml index 6c4d339b66b..eeeaf046e63 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,7 +16,7 @@ environment: sympy cython keyring PIP_DEPENDENCIES: > pytest-qt pytest-mock pytest-timeout flaky codecov - python-language-server[all] + python-language-server[all] qdarkstyle APPVEYOR_RDP_PASSWORD: "dcca4c4863E30d56c2e0dda6327370b3#" matrix: diff --git a/continuous_integration/posix/install.sh b/continuous_integration/posix/install.sh index f3907d10640..2f3d0dee79f 100755 --- a/continuous_integration/posix/install.sh +++ b/continuous_integration/posix/install.sh @@ -15,7 +15,7 @@ else pytest pytest-cov numpydoc scipy cython pillow jedi pycodestyle sympy \ keyring pexpect" export PIP_DEPENDENCIES="coveralls pytest-qt pytest-mock pytest-timeout flaky \ - python-language-server[all]" + python-language-server[all] qdarkstyle" fi diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 1cea3c136ff..5c310102e4a 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -15,3 +15,4 @@ pyqt5 keyring spyder-kernels>=1.0 python-language-server +qdarkstyle diff --git a/setup.py b/setup.py index 673528ba1c5..a1b24ba6f0e 100644 --- a/setup.py +++ b/setup.py @@ -225,6 +225,7 @@ def run(self): 'pyqt5<5.10;python_version>="3"', # Pyls with all its dependencies 'python-language-server[all]', + 'qdarkstyle', # Required to get SSH connections to remote kernels 'pexpect;platform_system!="Windows"', 'paramiko;platform_system=="Windows"' diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 1029cb0f81e..57b7374928d 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -165,8 +165,7 @@ from spyder.utils.misc import select_port, getcwd_or_home, get_python_executable from spyder.widgets.fileswitcher import FileSwitcher from spyder.plugins.lspmanager import LSPManager - - +from spyder.config.gui import is_dark_font_color #============================================================================== # Local gui imports @@ -188,6 +187,10 @@ from spyder.otherplugins import get_spyderplugins_mods from spyder.app import tour +#============================================================================== +# Third-party library imports +#============================================================================== +import qdarkstyle #============================================================================== # Get the cwd before initializing WorkingDirectory, which sets it to the one @@ -553,6 +556,16 @@ def create_toolbar(self, title, object_name, iconsize=24): def setup(self): """Setup main window""" self.debug_print("*** Start of MainWindow setup ***") + self.debug_print(" ..theme configuration") + ui_theme = CONF.get('color_schemes', 'ui_theme') + color_scheme = CONF.get('color_schemes', 'selected') + if ui_theme == 'dark': + self.setStyleSheet(qdarkstyle.load_stylesheet_from_environment()) + elif ui_theme == 'automatic': + if not is_dark_font_color(color_scheme): + self.setStyleSheet( + qdarkstyle.load_stylesheet_from_environment()) + self.debug_print(" ..core actions") self.close_dockwidget_action = create_action(self, icon=ima.icon('DialogCloseButton'), diff --git a/spyder/config/gui.py b/spyder/config/gui.py index 92778fae487..26b45992ab8 100644 --- a/spyder/config/gui.py +++ b/spyder/config/gui.py @@ -28,6 +28,8 @@ from spyder.py3compat import to_text_string from spyder.utils import syntaxhighlighters as sh +# Third-party imports +from qtconsole.styles import dark_color # To save metadata about widget shortcuts (needed to build our # preferences page) @@ -164,5 +166,12 @@ def set_default_color_scheme(name, replace=True): set_color_scheme(name, sh.get_color_scheme(name), replace=replace) +def is_dark_font_color(color_scheme): + """Check if the font color used in the color scheme is dark.""" + color_scheme = get_color_scheme(color_scheme) + font_color, fon_fw, fon_fs = color_scheme['normal'] + return dark_color(font_color) + + for _name in sh.COLOR_SCHEME_NAMES: set_default_color_scheme(_name, replace=False) diff --git a/spyder/config/main.py b/spyder/config/main.py index 9995faec57d..9730f5005d8 100755 --- a/spyder/config/main.py +++ b/spyder/config/main.py @@ -465,6 +465,7 @@ }), ('color_schemes', { + 'ui_theme': 'automatic', 'names': ['emacs', 'idle', 'monokai', 'pydev', 'scintilla', 'spyder', 'spyder/dark', 'zenburn', 'solarized/light', 'solarized/dark'], diff --git a/spyder/preferences/configdialog.py b/spyder/preferences/configdialog.py index cf558dce6f3..5aaca3a4a9b 100644 --- a/spyder/preferences/configdialog.py +++ b/spyder/preferences/configdialog.py @@ -40,6 +40,7 @@ from spyder.widgets.colors import ColorLayout from spyder.widgets.comboboxes import FileComboBox from spyder.plugins.editor.widgets.codeeditor import CodeEditor +from spyder.config.gui import is_dark_font_color HDPI_QT_PAGE = "https://doc.qt.io/qt-5/highdpi.html" @@ -911,7 +912,6 @@ def setup_page(self): icons_combo = self.create_combobox(_('Icon theme'), icon_choices, 'icon_theme', restart=True) - vertdock_box = newcb(_("Vertical title bars in panes"), 'vertical_dockwidget_titlebars') verttabs_box = newcb(_("Vertical tabs in panes"), @@ -1166,23 +1166,32 @@ def setup_page(self): # Widget setup self.scheme_choices_dict = {} about_label.setWordWrap(True) - schemes_combobox_widget = self.create_combobox(_('Scheme:'), + schemes_combobox_widget = self.create_combobox(_('Syntax scheme:'), [('', '')], 'selected') self.schemes_combobox = schemes_combobox_widget.combobox - # Layouts - vlayout = QVBoxLayout() + ui_themes = ['Automatic', 'Light', 'Dark'] + ui_theme_choices = list(zip(ui_themes, [ui_theme.lower() + for ui_theme in ui_themes])) + ui_theme_combo = self.create_combobox(_('Interface theme:'), + ui_theme_choices, + 'ui_theme', + restart=True) + # Layouts manage_layout = QVBoxLayout() manage_layout.addWidget(about_label) - combo_layout = QHBoxLayout() - combo_layout.addWidget(schemes_combobox_widget.label) - combo_layout.addWidget(schemes_combobox_widget.combobox) + comboboxes_layout = QGridLayout() + comboboxes_layout.addWidget(ui_theme_combo.label, 0, 0) + comboboxes_layout.addWidget(ui_theme_combo.combobox, 0, 1) + + comboboxes_layout.addWidget(schemes_combobox_widget.label, 1, 0) + comboboxes_layout.addWidget(schemes_combobox_widget.combobox, 1, 1) buttons_layout = QVBoxLayout() - buttons_layout.addLayout(combo_layout) + buttons_layout.addLayout(comboboxes_layout) buttons_layout.addWidget(edit_button) buttons_layout.addWidget(self.reset_button) buttons_layout.addWidget(self.delete_button) @@ -1200,6 +1209,7 @@ def setup_page(self): manage_group = QGroupBox(_("Manage color schemes")) manage_group.setLayout(manage_layout) + vlayout = QVBoxLayout() vlayout.addWidget(manage_group) self.setLayout(vlayout) @@ -1223,15 +1233,46 @@ def setup_page(self): def apply_settings(self, options): self.set_option('selected', self.current_scheme) - self.main.editor.apply_plugin_settings(['color_scheme_name']) - if self.main.ipyconsole is not None: - self.main.ipyconsole.apply_plugin_settings(['color_scheme_name']) - if self.main.historylog is not None: - self.main.historylog.apply_plugin_settings(['color_scheme_name']) - if self.main.help is not None: - self.main.help.apply_plugin_settings(['color_scheme_name']) - self.update_combobox() - self.update_preview() + color_scheme = self.get_option('selected') + ui_theme = self.get_option('ui_theme') + style_sheet = self.main.styleSheet() + if ui_theme == 'automatic': + if ((not is_dark_font_color(color_scheme) and not style_sheet) + or (is_dark_font_color(color_scheme) and style_sheet)): + self.changed_options.add('ui_theme') + elif 'ui_theme' in self.changed_options: + self.changed_options.remove('ui_theme') + + if 'ui_theme' not in self.changed_options: + self.main.editor.apply_plugin_settings(['color_scheme_name']) + if self.main.ipyconsole is not None: + self.main.ipyconsole.apply_plugin_settings( + ['color_scheme_name']) + if self.main.historylog is not None: + self.main.historylog.apply_plugin_settings( + ['color_scheme_name']) + if self.main.help is not None: + self.main.help.apply_plugin_settings(['color_scheme_name']) + self.update_combobox() + self.update_preview() + else: + if 'ui_theme' in self.changed_options: + if (style_sheet and ui_theme == 'dark' or + not style_sheet and ui_theme == 'light'): + self.changed_options.remove('ui_theme') + + if 'ui_theme' not in self.changed_options: + self.main.editor.apply_plugin_settings(['color_scheme_name']) + if self.main.ipyconsole is not None: + self.main.ipyconsole.apply_plugin_settings( + ['color_scheme_name']) + if self.main.historylog is not None: + self.main.historylog.apply_plugin_settings( + ['color_scheme_name']) + if self.main.help is not None: + self.main.help.apply_plugin_settings(['color_scheme_name']) + self.update_combobox() + self.update_preview() # Helpers # ------------------------------------------------------------------------- @@ -1532,6 +1573,8 @@ def add_color_scheme_stack(self, scheme_name, custom=False): if not custom: line_edit.textbox.setDisabled(True) + if not self.isVisible(): + line_edit.setVisible(False) cs_layout = QVBoxLayout() cs_layout.addLayout(name_layout) diff --git a/spyder/utils/icon_manager.py b/spyder/utils/icon_manager.py index 277d76dfdd3..05188f1ac21 100644 --- a/spyder/utils/icon_manager.py +++ b/spyder/utils/icon_manager.py @@ -14,39 +14,61 @@ # Local imports from spyder.config.base import get_image_path from spyder.config.main import CONF +from spyder.config.gui import is_dark_font_color import qtawesome as qta +def get_foreground_color(): + """ + Get main color for the icons based on the color theme + and color scheme currently selected. + """ + ui_theme = CONF.get('color_schemes', 'ui_theme') + color_scheme = CONF.get('color_schemes', 'selected') + if ui_theme == 'dark': + foreground_color = 'white' + elif ui_theme == 'automatic': + if not is_dark_font_color(color_scheme): + foreground_color = 'white' + else: + foreground_color = 'black' + else: + foreground_color = 'black' + return foreground_color + + +MAIN_FG_COLOR = get_foreground_color() + _resource = { 'directory': osp.join(osp.dirname(osp.realpath(__file__)), '../fonts'), 'loaded': False, } _qtaargs = { - 'log': [('fa.file-text-o',), {}], - 'configure': [('fa.wrench',), {}], - 'bold': [('fa.bold',), {}], - 'italic': [('fa.italic',), {}], - 'genprefs': [('fa.cogs',), {}], - 'exit': [('fa.power-off',), {}], + 'log': [('fa.file-text-o',), {'color': MAIN_FG_COLOR}], + 'configure': [('fa.wrench',), {'color': MAIN_FG_COLOR}], + 'bold': [('fa.bold',), {'color': MAIN_FG_COLOR}], + 'italic': [('fa.italic',), {'color': MAIN_FG_COLOR}], + 'genprefs': [('fa.cogs',), {'color': MAIN_FG_COLOR}], + 'exit': [('fa.power-off',), {'color': MAIN_FG_COLOR}], 'run_small': [('fa.play',), {'color': 'green'}], 'stop': [('fa.stop',), {'color': 'darkred'}], - 'syspath': [('fa.cogs',), {}], - 'font': [('fa.font',), {}], - 'keyboard': [('fa.keyboard-o',), {}], - 'eyedropper': [('fa.eyedropper',), {}], + 'syspath': [('fa.cogs',), {'color': MAIN_FG_COLOR}], + 'font': [('fa.font',), {'color': MAIN_FG_COLOR}], + 'keyboard': [('fa.keyboard-o',), {'color': MAIN_FG_COLOR}], + 'eyedropper': [('fa.eyedropper',), {'color': MAIN_FG_COLOR}], 'tooloptions': [('fa.cog',), {'color': '#333333'}], - 'edit24': [('fa.edit',), {}], - 'edit': [('fa.edit',), {}], - 'filenew': [('fa.file-o',), {}], - 'fileopen': [('fa.folder-open',), {}], - 'revert': [('fa.undo',), {}], - 'filesave': [('fa.save',), {}], - 'save_all': [('fa.save', 'fa.save'), {'options': [{'offset': (-0.2, -0.2), 'scale_factor': 0.6}, {'offset': (0.2, 0.2), 'scale_factor': 0.6}]}], - 'filesaveas': [('fa.save', 'fa.pencil'), {'options': [{'offset': (-0.2, -0.2), 'scale_factor': 0.6}, {'offset': (0.2, 0.2), 'scale_factor': 0.6}]}], - 'print': [('fa.print',), {}], - 'fileclose': [('fa.close',), {}], - 'filecloseall': [('fa.close', 'fa.close', 'fa.close'), {'options': [{'scale_factor': 0.6, 'offset': (0.3, -0.3)}, {'scale_factor': 0.6, 'offset': (-0.3, -0.3)}, {'scale_factor': 0.6, 'offset': (0.3, 0.3)}]}], + 'edit24': [('fa.edit',), {'color': MAIN_FG_COLOR}], + 'edit': [('fa.edit',), {'color': MAIN_FG_COLOR}], + 'filenew': [('fa.file-o',), {'color': MAIN_FG_COLOR}], + 'fileopen': [('fa.folder-open',), {'color': MAIN_FG_COLOR}], + 'revert': [('fa.undo',), {'color': MAIN_FG_COLOR}], + 'filesave': [('fa.save',), {'color': MAIN_FG_COLOR}], + 'save_all': [('fa.save', 'fa.save'), {'options': [{'offset': (-0.2, -0.2), 'scale_factor': 0.6, 'color': MAIN_FG_COLOR}, {'offset': (0.2, 0.2), 'scale_factor': 0.6, 'color': MAIN_FG_COLOR}]}], + 'filesaveas': [('fa.save', 'fa.pencil'), {'options': [{'offset': (-0.2, -0.2), 'scale_factor': 0.6, 'color': MAIN_FG_COLOR}, {'offset': (0.2, 0.2), 'scale_factor': 0.6, 'color': MAIN_FG_COLOR}]}], + 'print': [('fa.print',), {'color': MAIN_FG_COLOR}], + 'fileclose': [('fa.close',), {'color': MAIN_FG_COLOR}], + 'filecloseall': [('fa.close', 'fa.close', 'fa.close'), {'options': [{'scale_factor': 0.6, 'offset': (0.3, -0.3), 'color': MAIN_FG_COLOR}, {'scale_factor': 0.6, 'offset': (-0.3, -0.3), 'color': MAIN_FG_COLOR}, {'scale_factor': 0.6, 'offset': (0.3, 0.3), 'color': MAIN_FG_COLOR}]}], 'breakpoint_big': [('fa.circle',), {'color': 'darkred'} ], 'breakpoint_cond_big': [('fa.question-circle',), {'color': 'darkred'},], 'debug': [('spyder.debug',), {'color': '#3775a9'}], @@ -56,91 +78,91 @@ 'arrow-step-out': [('spyder.step-out',), {'color': '#3775a9'}], 'stop_debug': [('fa.stop',), {'color': '#3775a9'}], 'run': [('fa.play',), {'color': 'green'}], - 'run_settings': [('fa.wrench', 'fa.play'), {'options': [{'offset':(0.0, -0.1)}, {'offset': (0.2, 0.125), 'color': 'green', 'scale_factor': 0.8}]}], - 'run_again': [('fa.repeat', 'fa.play'), {'options': [{'offset':(0.0, -0.1)}, {'offset': (0.2, 0.125), 'color': 'green', 'scale_factor': 0.8}]}], - 'run_selection': [('spyder.run-selection',), {}], + 'run_settings': [('fa.wrench', 'fa.play'), {'options': [{'offset':(0.0, -0.1), 'color': MAIN_FG_COLOR}, {'offset': (0.2, 0.125), 'color': 'green', 'scale_factor': 0.8}]}], + 'run_again': [('fa.repeat', 'fa.play'), {'options': [{'offset':(0.0, -0.1), 'color': MAIN_FG_COLOR}, {'offset': (0.2, 0.125), 'color': 'green', 'scale_factor': 0.8}]}], + 'run_selection': [('spyder.run-selection',), {'color': MAIN_FG_COLOR}], 'run_cell': [('spyder.cell-code', 'spyder.cell-border', 'spyder.cell-play'), - {'options': [{'color': '#fff683'}, {}, {'color': 'green'}]}], + {'options': [{'color': '#fff683'}, {'color': MAIN_FG_COLOR}, {'color': 'green'}]}], 'run_cell_advance': [('spyder.cell-code', 'spyder.cell-border', 'spyder.cell-play', 'spyder.cell-next'), - {'options': [{'color': '#fff683'}, {}, {'color': 'green'}, {'color': 'red'}]}], + {'options': [{'color': '#fff683'}, {'color': MAIN_FG_COLOR,}, {'color': 'green'}, {'color': 'red'}]}], 'todo_list': [('fa.th-list', 'fa.check'), {'options': [{'color': '#999999'}, {'offset': (0.0, 0.2), 'color': '#3775a9', 'color_disabled': '#748fa6'}]}], 'wng_list': [('fa.th-list', 'fa.warning'), {'options': [{'color': '#999999'}, {'offset': (0.0, 0.2), 'scale_factor': 0.75, 'color': 'orange', 'color_disabled': '#face7e'}]}], 'prev_wng': [('fa.arrow-left', 'fa.warning'), {'options': [{'color': '#999999'}, {'offset': (0.0, 0.2), 'scale_factor': 0.75, 'color': 'orange', 'color_disabled': '#face7e'}]}], 'next_wng': [('fa.arrow-right', 'fa.warning'), {'options': [{'color': '999999'}, {'offset': (0.0, 0.2), 'scale_factor': 0.75, 'color': 'orange', 'color_disabled': '#face7e'}]}], - 'last_edit_location': [('fa.caret-up',), {}], - 'prev_cursor': [('fa.hand-o-left',), {}], - 'next_cursor': [('fa.hand-o-right',), {}], - 'comment': [('fa.comment',), {}], - 'indent': [('fa.indent',), {}], - 'unindent': [('fa.outdent',), {}], - 'gotoline': [('fa.sort-numeric-asc',), {}], + 'last_edit_location': [('fa.caret-up',), {'color': MAIN_FG_COLOR}], + 'prev_cursor': [('fa.hand-o-left',), {'color': MAIN_FG_COLOR}], + 'next_cursor': [('fa.hand-o-right',), {'color': MAIN_FG_COLOR}], + 'comment': [('fa.comment',), {'color': MAIN_FG_COLOR}], + 'indent': [('fa.indent',), {'color': MAIN_FG_COLOR}], + 'unindent': [('fa.outdent',), {'color': MAIN_FG_COLOR}], + 'gotoline': [('fa.sort-numeric-asc',), {'color': MAIN_FG_COLOR}], 'error': [('fa.times-circle',), {'color': 'darkred'}], 'warning': [('fa.warning',), {'color': 'orange'}], 'todo': [('fa.check',), {'color': '#3775a9'}], - 'ipython_console': [('spyder.ipython-logo-alt',), {}], + 'ipython_console': [('spyder.ipython-logo-alt',), {'color': MAIN_FG_COLOR}], 'ipython_console_t': [('spyder.ipython-logo-alt',), {'color':'gray'}], 'python': [('spyder.python-logo-up', 'spyder.python-logo-down'), {'options': [{'color': '#3775a9'}, {'color': '#ffd444'}]}], 'pythonpath': [('spyder.python-logo-up', 'spyder.python-logo-down'), {'options': [{'color': '#3775a9'}, {'color': '#ffd444'}]}], - 'terminated': [('fa.circle',), {}], - 'cmdprompt': [('fa.terminal',), {}], + 'terminated': [('fa.circle',), {'color': MAIN_FG_COLOR}], + 'cmdprompt': [('fa.terminal',), {'color': MAIN_FG_COLOR}], 'cmdprompt_t': [('fa.terminal',), {'color':'gray'}], 'console': [('spyder.python-logo-up', 'spyder.python-logo-down'), {'options': [{'color': '#3775a9'}, {'color': '#ffd444'}]}], - 'findf': [('fa.file-o', 'fa.search'), {'options': [{'scale_factor': 1.0}, {'scale_factor': 0.6}]}], - 'history24': [('fa.history',), {}], - 'history': [('fa.history',), {}], - 'help': [('fa.question-circle',), {}], - 'lock': [('fa.lock',), {}], - 'lock_open': [('fa.unlock-alt',), {}], - 'outline_explorer': [('spyder.treeview',), {}], - 'project_expanded': [('fa.plus',), {}], - 'dictedit': [('fa.th-list',), {}], - 'previous': [('fa.arrow-left',), {}], - 'next': [('fa.arrow-right',), {}], - 'set_workdir': [('fa.check',), {}], - 'up': [('fa.arrow-up',), {}], - 'down': [('fa.arrow-down',), {}], - 'filesaveas2': [('fa.save', 'fa.close'), {'options': [{'scale_factor': 0.8, 'offset': (-0.1, -0.1)}, {'offset': (0.2, 0.2)}]}], # save_session_action + 'findf': [('fa.file-o', 'fa.search'), {'options': [{'scale_factor': 1.0, 'color': MAIN_FG_COLOR}, {'scale_factor': 0.6, 'color': MAIN_FG_COLOR}]}], + 'history24': [('fa.history',), {'color': MAIN_FG_COLOR}], + 'history': [('fa.history',), {'color': MAIN_FG_COLOR}], + 'help': [('fa.question-circle',), {'color': MAIN_FG_COLOR}], + 'lock': [('fa.lock',), {'color': MAIN_FG_COLOR}], + 'lock_open': [('fa.unlock-alt',), {'color': MAIN_FG_COLOR}], + 'outline_explorer': [('spyder.treeview',), {'color': MAIN_FG_COLOR}], + 'project_expanded': [('fa.plus',), {'color': MAIN_FG_COLOR}], + 'dictedit': [('fa.th-list',), {'color': MAIN_FG_COLOR}], + 'previous': [('fa.arrow-left',), {'color': MAIN_FG_COLOR}], + 'next': [('fa.arrow-right',), {'color': MAIN_FG_COLOR}], + 'set_workdir': [('fa.check',), {'color': MAIN_FG_COLOR}], + 'up': [('fa.arrow-up',), {'color': MAIN_FG_COLOR}], + 'down': [('fa.arrow-down',), {'color': MAIN_FG_COLOR}], + 'filesaveas2': [('fa.save', 'fa.close'), {'options': [{'scale_factor': 0.8, 'offset': (-0.1, -0.1), 'color': MAIN_FG_COLOR}, {'offset': (0.2, 0.2), 'color': MAIN_FG_COLOR}]}], # save_session_action 'spyder': [('spyder.spyder-logo-background', 'spyder.spyder-logo-web', 'spyder.spyder-logo-snake'), {'options': [{'color': '#414141'}, {'color': '#fafafa'}, {'color': '#ee0000'}]}], - 'find': [('fa.search',), {}], - 'findnext': [('fa.search', 'fa.long-arrow-down'), {'options':[{'scale_factor': 0.6, 'offset': (0.3, 0.0)}, {'offset': (-0.3, 0.0)}]}], - 'findprevious': [('fa.search', 'fa.long-arrow-up'), {'options':[{'scale_factor': 0.6, 'offset': (0.3, 0.0)}, {'offset': (-0.3, 0.0)}]}], - 'replace': [('fa.exchange',), {}], - 'undo': [('fa.undo',), {}], - 'redo': [('fa.repeat',), {}], + 'find': [('fa.search',), {'color': MAIN_FG_COLOR}], + 'findnext': [('fa.search', 'fa.long-arrow-down'), {'options':[{'scale_factor': 0.6, 'offset': (0.3, 0.0), 'color': MAIN_FG_COLOR}, {'offset': (-0.3, 0.0), 'color': MAIN_FG_COLOR}]}], + 'findprevious': [('fa.search', 'fa.long-arrow-up'), {'options':[{'scale_factor': 0.6, 'offset': (0.3, 0.0), 'color': MAIN_FG_COLOR}, {'offset': (-0.3, 0.0), 'color': MAIN_FG_COLOR}]}], + 'replace': [('fa.exchange',), {'color': MAIN_FG_COLOR}], + 'undo': [('fa.undo',), {'color': MAIN_FG_COLOR}], + 'redo': [('fa.repeat',), {'color': MAIN_FG_COLOR}], 'restart': [('fa.repeat',), {'çolor': '#3775a9'}], - 'editcopy': [('fa.copy',), {}], - 'editcut': [('fa.scissors',), {}], - 'editpaste': [('fa.clipboard',), {}], - 'editdelete': [('fa.eraser',), {}], - 'editclear': [('fa.times',), {}], - 'selectall': [('spyder.text-select-all',), {}], + 'editcopy': [('fa.copy',), {'color': MAIN_FG_COLOR}], + 'editcut': [('fa.scissors',), {'color': MAIN_FG_COLOR}], + 'editpaste': [('fa.clipboard',), {'color': MAIN_FG_COLOR}], + 'editdelete': [('fa.eraser',), {'color': MAIN_FG_COLOR}], + 'editclear': [('fa.times',), {'color': MAIN_FG_COLOR}], + 'selectall': [('spyder.text-select-all',), {'color': MAIN_FG_COLOR}], 'pythonpath_mgr': [('spyder.python-logo-up', 'spyder.python-logo-down'), {'options': [{'color': '#3775a9'}, {'color': '#ffd444'}]}], 'exit': [('fa.power-off',), {'color': 'darkred'}], - 'advanced': [('fa.gear',), {}], - 'bug': [('fa.bug',), {}], - 'maximize': [('spyder.maximize-pane',), {}], - 'unmaximize': [('spyder.minimize-pane',), {}], - 'window_nofullscreen': [('spyder.inward',), {}], - 'window_fullscreen': [('fa.arrows-alt',), {}], - 'MessageBoxWarning': [('fa.warning',), {}], - 'arredit': [('fa.table',), {}], - 'zoom_out': [('fa.search-minus',), {}], - 'zoom_in': [('fa.search-plus',), {}], - 'home': [('fa.home',), {}], - 'find': [('fa.search',), {}], - 'plot': [('fa.line-chart',), {}], - 'hist': [('fa.bar-chart',), {}], - 'imshow': [('fa.image',), {}], - 'insert': [('fa.sign-in',), {}], - 'rename': [('fa.pencil',), {}], - 'edit_add': [('fa.plus',), {}], - 'edit_remove': [('fa.minus',), {}], - 'browse_tab': [('fa.folder-o',), {}], - 'filelist': [('fa.list',), {}], - 'newwindow': [('spyder.window',), {}], - 'versplit': [('spyder.rows',), {}], - 'horsplit': [('fa.columns',), {}], - 'close_panel': [('fa.close',), {}], + 'advanced': [('fa.gear',), {'color': MAIN_FG_COLOR}], + 'bug': [('fa.bug',), {'color': MAIN_FG_COLOR}], + 'maximize': [('spyder.maximize-pane',), {'color': MAIN_FG_COLOR}], + 'unmaximize': [('spyder.minimize-pane',), {'color': MAIN_FG_COLOR}], + 'window_nofullscreen': [('spyder.inward',), {'color': MAIN_FG_COLOR}], + 'window_fullscreen': [('fa.arrows-alt',), {'color': MAIN_FG_COLOR}], + 'MessageBoxWarning': [('fa.warning',), {'color': MAIN_FG_COLOR}], + 'arredit': [('fa.table',), {'color': MAIN_FG_COLOR}], + 'zoom_out': [('fa.search-minus',), {'color': MAIN_FG_COLOR}], + 'zoom_in': [('fa.search-plus',), {'color': MAIN_FG_COLOR}], + 'home': [('fa.home',), {'color': MAIN_FG_COLOR}], + 'find': [('fa.search',), {'color': MAIN_FG_COLOR}], + 'plot': [('fa.line-chart',), {'color': MAIN_FG_COLOR}], + 'hist': [('fa.bar-chart',), {'color': MAIN_FG_COLOR}], + 'imshow': [('fa.image',), {'color': MAIN_FG_COLOR}], + 'insert': [('fa.sign-in',), {'color': MAIN_FG_COLOR}], + 'rename': [('fa.pencil',), {'color': MAIN_FG_COLOR}], + 'edit_add': [('fa.plus',), {'color': MAIN_FG_COLOR}], + 'edit_remove': [('fa.minus',), {'color': MAIN_FG_COLOR}], + 'browse_tab': [('fa.folder-o',), {'color': MAIN_FG_COLOR}], + 'filelist': [('fa.list',), {'color': MAIN_FG_COLOR}], + 'newwindow': [('spyder.window',), {'color': MAIN_FG_COLOR}], + 'versplit': [('spyder.rows',), {'color': MAIN_FG_COLOR}], + 'horsplit': [('fa.columns',), {'color': MAIN_FG_COLOR}], + 'close_panel': [('fa.close',), {'color': MAIN_FG_COLOR}], 'class': [('spyder.circle-letter-c',), {'color':'#3775a9'}], 'private2': [('spyder.circle-underscore',), {'color':'#e69c9c'}], 'private1': [('spyder.circle-underscore',), {'color':'#e69c9c'}], @@ -148,57 +170,57 @@ 'function': [('spyder.circle-letter-f',), {'color':'orange'}], 'blockcomment': [('spyder.circle-hash',), {'color':'grey'}], 'cell': [('spyder.circle-percent',), {'color':'red'}], - 'fromcursor': [('fa.hand-o-right',), {}], - 'filter': [('fa.filter',), {}], - 'folder_new': [('fa.folder-o', 'fa.plus'), {'options': [{}, {'scale_factor': 0.5, 'offset': (0.0, 0.1)}]}], - 'package_new': [('fa.folder-o', 'spyder.python-logo'), {'options': [{'offset': (0.0, -0.125)}, {'offset': (0.0, 0.125)}]}], + 'fromcursor': [('fa.hand-o-right',), {'color': MAIN_FG_COLOR}], + 'filter': [('fa.filter',), {'color': MAIN_FG_COLOR}], + 'folder_new': [('fa.folder-o', 'fa.plus'), {'options': [{'color': MAIN_FG_COLOR}, {'scale_factor': 0.5, 'offset': (0.0, 0.1), 'color': MAIN_FG_COLOR}]}], + 'package_new': [('fa.folder-o', 'spyder.python-logo'), {'options': [{'offset': (0.0, -0.125), 'color': MAIN_FG_COLOR}, {'offset': (0.0, 0.125), 'color': MAIN_FG_COLOR}]}], 'vcs_commit': [('fa.check',), {'color': 'green'}], 'vcs_browse': [('fa.search',), {'color': 'green'}], - 'kill': [('fa.warning',), {}], - 'reload': [('fa.repeat',), {}], - 'auto_reload': [('fa.repeat', 'fa.clock-o'), {'options': [{'scale_factor': 0.75, 'offset': (-0.1, -0.1)}, {'scale_factor': 0.5, 'offset': (0.25, 0.25)}]}], - 'fileimport': [('fa.download',), {}], - 'environ': [('fa.th-list',), {}], - 'options_less': [('fa.minus-square',), {}], - 'options_more': [('fa.plus-square',), {}], - 'ArrowDown': [('fa.arrow-circle-down',), {}], - 'ArrowUp': [('fa.arrow-circle-up',), {}], - 'ArrowBack': [('fa.arrow-circle-left',), {}], - 'ArrowForward': [('fa.arrow-circle-right',), {}], - 'DialogApplyButton': [('fa.check',), {}], - 'DialogCloseButton': [('fa.close',), {}], - 'DirClosedIcon': [('fa.folder-o',), {}], + 'kill': [('fa.warning',), {'color': MAIN_FG_COLOR}], + 'reload': [('fa.repeat',), {'color': MAIN_FG_COLOR}], + 'auto_reload': [('fa.repeat', 'fa.clock-o'), {'options': [{'scale_factor': 0.75, 'offset': (-0.1, -0.1), 'color': MAIN_FG_COLOR}, {'scale_factor': 0.5, 'offset': (0.25, 0.25), 'color': MAIN_FG_COLOR}]}], + 'fileimport': [('fa.download',), {'color': MAIN_FG_COLOR}], + 'environ': [('fa.th-list',), {'color': MAIN_FG_COLOR}], + 'options_less': [('fa.minus-square',), {'color': MAIN_FG_COLOR}], + 'options_more': [('fa.plus-square',), {'color': MAIN_FG_COLOR}], + 'ArrowDown': [('fa.arrow-circle-down',), {'color': MAIN_FG_COLOR}], + 'ArrowUp': [('fa.arrow-circle-up',), {'color': MAIN_FG_COLOR}], + 'ArrowBack': [('fa.arrow-circle-left',), {'color': MAIN_FG_COLOR}], + 'ArrowForward': [('fa.arrow-circle-right',), {'color': MAIN_FG_COLOR}], + 'DialogApplyButton': [('fa.check',), {'color': MAIN_FG_COLOR}], + 'DialogCloseButton': [('fa.close',), {'color': MAIN_FG_COLOR}], + 'DirClosedIcon': [('fa.folder-o',), {'color': MAIN_FG_COLOR}], 'DialogHelpButton': [('fa.life-ring',), {'color': 'darkred'}], 'MessageBoxInformation': [('fa.info',), {'color': '3775a9'}], - 'DirOpenIcon': [('fa.folder-open',), {}], - 'FileIcon': [('fa.file-o',), {}], - 'ExcelFileIcon': [('fa.file-excel-o',), {}], - 'WordFileIcon': [('fa.file-word-o',), {}], - 'PowerpointFileIcon': [('fa.file-powerpoint-o',), {}], - 'PDFIcon': [('fa.file-pdf-o',), {}], - 'AudioFileIcon': [('fa.file-audio-o',), {}], - 'ImageFileIcon': [('fa.file-image-o',), {}], - 'ArchiveFileIcon': [('fa.file-archive-o',), {}], - 'VideoFileIcon': [('fa.file-video-o',), {}], - 'TextFileIcon': [('fa.file-text-o',), {}], - 'project': [('fa.folder-open-o',), {}], - 'DriveHDIcon': [('fa.hdd-o',), {}], - 'arrow': [('fa.arrow-right',), {}], - 'collapse': [('spyder.inward',), {}], - 'expand': [('fa.arrows-alt',), {}], - 'restore': [('fa.level-up',), {}], - 'collapse_selection': [('fa.minus-square-o',), {}], - 'expand_selection': [('fa.plus-square-o',), {}], - 'copywop': [('fa.terminal',), {}], - 'editpaste': [('fa.paste',), {}], - 'editcopy': [('fa.copy',), {}], - 'edit': [('fa.edit',), {}], + 'DirOpenIcon': [('fa.folder-open',), {'color': MAIN_FG_COLOR}], + 'FileIcon': [('fa.file-o',), {'color': MAIN_FG_COLOR}], + 'ExcelFileIcon': [('fa.file-excel-o',), {'color': MAIN_FG_COLOR}], + 'WordFileIcon': [('fa.file-word-o',), {'color': MAIN_FG_COLOR}], + 'PowerpointFileIcon': [('fa.file-powerpoint-o',), {'color': MAIN_FG_COLOR}], + 'PDFIcon': [('fa.file-pdf-o',), {'color': MAIN_FG_COLOR}], + 'AudioFileIcon': [('fa.file-audio-o',), {'color': MAIN_FG_COLOR}], + 'ImageFileIcon': [('fa.file-image-o',), {'color': MAIN_FG_COLOR}], + 'ArchiveFileIcon': [('fa.file-archive-o',), {'color': MAIN_FG_COLOR}], + 'VideoFileIcon': [('fa.file-video-o',), {'color': MAIN_FG_COLOR}], + 'TextFileIcon': [('fa.file-text-o',), {'color': MAIN_FG_COLOR}], + 'project': [('fa.folder-open-o',), {'color': MAIN_FG_COLOR}], + 'DriveHDIcon': [('fa.hdd-o',), {'color': MAIN_FG_COLOR}], + 'arrow': [('fa.arrow-right',), {'color': MAIN_FG_COLOR}], + 'collapse': [('spyder.inward',), {'color': MAIN_FG_COLOR}], + 'expand': [('fa.arrows-alt',), {'color': MAIN_FG_COLOR}], + 'restore': [('fa.level-up',), {'color': MAIN_FG_COLOR}], + 'collapse_selection': [('fa.minus-square-o',), {'color': MAIN_FG_COLOR}], + 'expand_selection': [('fa.plus-square-o',), {'color': MAIN_FG_COLOR}], + 'copywop': [('fa.terminal',), {'color': MAIN_FG_COLOR}], + 'editpaste': [('fa.paste',), {'color': MAIN_FG_COLOR}], + 'editcopy': [('fa.copy',), {'color': MAIN_FG_COLOR}], + 'edit': [('fa.edit',), {'color': MAIN_FG_COLOR}], 'convention': [('spyder.circle-letter-c',), {'color':'#3775a9'}], 'refactor': [('spyder.circle-letter-r',), {'color':'#3775a9'}], - '2uparrow': [('fa.angle-double-up',), {}], - '1uparrow': [('fa.angle-up',), {}], - '2downarrow': [('fa.angle-double-down',), {}], - '1downarrow': [('fa.angle-down',), {}], + '2uparrow': [('fa.angle-double-up',), {'color': MAIN_FG_COLOR}], + '1uparrow': [('fa.angle-up',), {'color': MAIN_FG_COLOR}], + '2downarrow': [('fa.angle-double-down',), {'color': MAIN_FG_COLOR}], + '1downarrow': [('fa.angle-down',), {'color': MAIN_FG_COLOR}], # --- Autocompletion type icons -------------- 'attribute': [('spyder.circle-letter-a',), {'color': 'magenta'}], 'module': [('spyder.circle-letter-m',), {'color': '#daa520'}], @@ -210,28 +232,28 @@ 'blockcomment': [('spyder.circle-hash',), {'color':'grey'}], 'cell': [('spyder.circle-percent',), {'color':'red'}], 'no_match': [('fa.circle',), {'color': 'gray'}], - 'github': [('fa.github',), {'color': 'black'}], + 'github': [('fa.github',), {'color': MAIN_FG_COLOR}], # --- Spyder Tour -------------------------------------------------------- - 'tour.close': [('fa.close',), {}], - 'tour.home': [('fa.fast-backward',), {}], - 'tour.previous': [('fa.backward',), {}], - 'tour.next': [('fa.forward',), {}], - 'tour.end': [('fa.fast-forward',), {}], + 'tour.close': [('fa.close',), {'color': MAIN_FG_COLOR}], + 'tour.home': [('fa.fast-backward',), {'color': MAIN_FG_COLOR}], + 'tour.previous': [('fa.backward',), {'color': MAIN_FG_COLOR}], + 'tour.next': [('fa.forward',), {'color': MAIN_FG_COLOR}], + 'tour.end': [('fa.fast-forward',), {'color': MAIN_FG_COLOR}], # --- Third party plugins ------------------------------------------------ - 'profiler': [('fa.clock-o',), {}], - 'pylint': [('fa.search', 'fa.check'), {'options': [{}, {'offset': (0.125, 0.125), 'color': 'orange'}]}], - 'condapackages': [('fa.archive',), {}], - 'spyder.example': [('fa.eye',), {}], - 'spyder.autopep8': [('fa.eye',), {}], - 'spyder.memory_profiler': [('fa.eye',), {}], - 'spyder.line_profiler': [('fa.eye',), {}], - 'symbol_find': [('fa.at',), {}], + 'profiler': [('fa.clock-o',), {'color': MAIN_FG_COLOR}], + 'pylint': [('fa.search', 'fa.check'), {'options': [{'color': MAIN_FG_COLOR}, {'offset': (0.125, 0.125), 'color': 'orange'}]}], + 'condapackages': [('fa.archive',), {'color': MAIN_FG_COLOR}], + 'spyder.example': [('fa.eye',), {'color': MAIN_FG_COLOR}], + 'spyder.autopep8': [('fa.eye',), {'color': MAIN_FG_COLOR}], + 'spyder.memory_profiler': [('fa.eye',), {'color': MAIN_FG_COLOR}], + 'spyder.line_profiler': [('fa.eye',), {'color': MAIN_FG_COLOR}], + 'symbol_find': [('fa.at',), {'color': MAIN_FG_COLOR}], 'folding.arrow_right_off': [('fa.caret-right',), {'color': 'gray'}], - 'folding.arrow_right_on': [('fa.caret-right',), {}], + 'folding.arrow_right_on': [('fa.caret-right',), {'color': MAIN_FG_COLOR}], 'folding.arrow_down_off': [('fa.caret-down',), {'color': 'gray'}], - 'folding.arrow_down_on': [('fa.caret-down',), {}], - 'lspserver': [('fa.server',), {}], - 'dependency_ok': [('fa.check',), {}], + 'folding.arrow_down_on': [('fa.caret-down',), {'color': MAIN_FG_COLOR}], + 'lspserver': [('fa.server',), {'color': MAIN_FG_COLOR}], + 'dependency_ok': [('fa.check',), {'color': MAIN_FG_COLOR}], 'dependency_warning': [('fa.warning',), {'color': 'orange'}], 'dependency_error': [('fa.warning',), {'color': 'darkred'}], }