From fced27aea14843cb6b63a1627c0555f2c21f887c Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 15 Nov 2018 23:31:16 +0100 Subject: [PATCH] DarkIcons: dark icons for regex, case sensitive and message box information --- spyder/plugins/findinfiles/widgets.py | 9 +++++---- spyder/utils/icon_manager.py | 4 +++- spyder/widgets/findreplace.py | 5 +++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/spyder/plugins/findinfiles/widgets.py b/spyder/plugins/findinfiles/widgets.py index 1b42ef408c6..9a05e39e832 100644 --- a/spyder/plugins/findinfiles/widgets.py +++ b/spyder/plugins/findinfiles/widgets.py @@ -41,7 +41,7 @@ from spyder.widgets.comboboxes import PatternComboBox from spyder.widgets.onecolumntree import OneColumnTree from spyder.utils.misc import regexp_error_msg -from spyder.utils.qthelpers import create_toolbutton, get_icon +from spyder.utils.qthelpers import create_toolbutton from spyder.config.gui import get_font from spyder.widgets.waitingspinner import QWaitingSpinner @@ -427,10 +427,11 @@ def __init__(self, parent, search_text, search_text_regexp, self.search_text = PatternComboBox(self, search_text, _("Search pattern")) self.edit_regexp = create_toolbutton(self, - icon=get_icon('regexp.svg'), + icon=ima.icon('regex'), tip=_('Regular expression')) self.case_button = create_toolbutton(self, - icon=get_icon("upper_lower.png"), + icon=ima.icon( + "format_letter_case"), tip=_("Case Sensitive")) self.case_button.setCheckable(True) self.case_button.setChecked(case_sensitive) @@ -469,7 +470,7 @@ def __init__(self, parent, search_text, search_text_regexp, and exclude_idx < self.exclude_pattern.count(): self.exclude_pattern.setCurrentIndex(exclude_idx) self.exclude_regexp = create_toolbutton(self, - icon=get_icon('regexp.svg'), + icon=ima.icon('regex'), tip=_('Regular expression')) self.exclude_regexp.setCheckable(True) self.exclude_regexp.setChecked(exclude_regexp) diff --git a/spyder/utils/icon_manager.py b/spyder/utils/icon_manager.py index c5278c3696d..14c5382885b 100644 --- a/spyder/utils/icon_manager.py +++ b/spyder/utils/icon_manager.py @@ -30,6 +30,8 @@ } _qtaargs = { + 'format_letter_case': [('mdi.format-letter-case',), {'color': MAIN_FG_COLOR}], + 'regex': [('mdi.regex',), {'color': MAIN_FG_COLOR}], 'log': [('fa.file-text-o',), {'color': MAIN_FG_COLOR}], 'configure': [('fa.wrench',), {'color': MAIN_FG_COLOR}], 'bold': [('fa.bold',), {'color': MAIN_FG_COLOR}], @@ -176,7 +178,7 @@ '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'}], + 'MessageBoxInformation': [('fa.info',), {'color': MAIN_FG_COLOR}], '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}], diff --git a/spyder/widgets/findreplace.py b/spyder/widgets/findreplace.py index b9824dd4f5c..2f67f63fe32 100644 --- a/spyder/widgets/findreplace.py +++ b/spyder/widgets/findreplace.py @@ -97,13 +97,14 @@ def __init__(self, parent, enable_replace=False): self.next_button.clicked.connect(self.update_search_combo) self.previous_button.clicked.connect(self.update_search_combo) - self.re_button = create_toolbutton(self, icon=get_icon('regexp.svg'), + self.re_button = create_toolbutton(self, icon=ima.icon('regex'), tip=_("Regular expression")) self.re_button.setCheckable(True) self.re_button.toggled.connect(lambda state: self.find()) self.case_button = create_toolbutton(self, - icon=get_icon("upper_lower.png"), + icon=ima.icon( + "format_letter_case"), tip=_("Case Sensitive")) self.case_button.setCheckable(True) self.case_button.toggled.connect(lambda state: self.find())