-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Use a better icon when no matches are found (Find/Replace widget) #20268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ccordoba12 ! I think the new icon looks good. Also while checking this I got a traceback related to the findreplace code and the split editor/new window functionality:
Traceback (most recent call last):
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\editor\widgets\editor.py", line 2265, in focus_changed
self.refresh()
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\editor\widgets\editor.py", line 2425, in refresh
self.find_widget.set_editor(editor, refresh=False)
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\widgets\findreplace.py", line 452, in set_editor
self.editor.textChanged.disconnect(self.update_matches)
RuntimeError: wrapped C/C++ object of type CodeEditor has been deleted
Traceback (most recent call last):
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\editor\widgets\editor.py", line 2219, in current_changed
self.find_widget.set_editor(editor, refresh=False)
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\widgets\findreplace.py", line 452, in set_editor
self.editor.textChanged.disconnect(self.update_matches)
RuntimeError: wrapped C/C++ object of type CodeEditor has been deleted
Traceback (most recent call last):
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\editor\widgets\editor.py", line 2265, in focus_changed
self.refresh()
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\editor\widgets\editor.py", line 2425, in refresh
self.find_widget.set_editor(editor, refresh=False)
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\widgets\findreplace.py", line 452, in set_editor
self.editor.textChanged.disconnect(self.update_matches)
RuntimeError: wrapped C/C++ object of type CodeEditor has been deleted
Traceback (most recent call last):
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\editor\widgets\editor.py", line 2219, in current_changed
self.find_widget.set_editor(editor, refresh=False)
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\widgets\findreplace.py", line 452, in set_editor
self.editor.textChanged.disconnect(self.update_matches)
RuntimeError: wrapped C/C++ object of type CodeEditor has been deleted
Should that be solved in a different PR perhaps, maybe at #20221 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, though could you maybe reduce the padding between the icon and the "clear field" (delete) button to about to half the current value? It looks rather strange currently and takes up more of the field's space than necessary. Thanks!
7257511
to
712ac62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info @ccordoba12 , then this LGTM 👍
I will leave this approved but I think that @CAM-Gerlach comment makes sense too, so if it is possible/not to complicated maybe it could be worthy to try to do the change before merging this
As it's almost the case, it was not trivial to implement in Qt, but I managed to do it. See my original description for the updated screenshot. @dalthviz, could you check that it looks ok on Windows and Mac? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending @dalthviz 's checks (I'm still on a trip right now visiting family, sorry)
Description of Changes
The current icon (the warning one) did not represent correctly the lack of matches after searching for text.
Before
After
This is a follow-up of PR: Improve UX/UI of the
FindReplace
widget #20049.Issue(s) Resolved
Fixes #20255.
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: