-
-
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: Improve the way users can select the interface font in Preferences (Appearance) #22927
base: master
Are you sure you want to change the base?
Conversation
@dalthviz, please give this a manual check to see if the implementation works as expected for you. |
Also, fix a small error in a comment.
Also, add a note about that in our Changelog along with the missing API changes done in 6.0.2
- This will give users the same kind of interactivity they get when checking different interface fonts in its preview widget. - Also, rename update_preview method to update_editor_preview for clarity.
94e2623
to
b0afba9
Compare
Did a quick check and seems like the described functionality is working 👍 However, while checking this, I was able to trigger an error when changing the color scheme: Traceback (most recent call last):
File "E:\Acer\Documentos\Spyder\Spyder otros\carlos\spyder\spyder\plugins\appearance\confpage.py", line 507, in edit_scheme
self.update_editor_preview(scheme_name='temp')
File "E:\Acer\Documentos\Spyder\Spyder otros\carlos\spyder\spyder\plugins\appearance\confpage.py", line 414, in update_editor_preview
scheme_name = self.scheme_choices_dict[scheme_name]
KeyError: 'temp' Some other things I noticed which maybe could be improved or seems worthy to mention just in case: |
Thanks for the review @dalthviz!
I was able to reproduce this error and it should be fixed in my second to last commit.
Yeah, that also happens when you increase the interface font size to 15 or 20. But the idea of the new preview widget is to give users a sense of how that font would look in the application. That's why I think we shouldn't change its size to accommodate the
Great catch! Fixed in my last commit. |
…nged - Before we were not doing that when users selected a new item with the keyboard. - Also, fix entry in Changelog with missing class.
aebfeeb
to
a7090c1
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 @ccordoba12 ! Gave this a manual check with the latest changes and seems like things are working as expected! Left a couple of comments/questions/ideas but no changes are actually that required for this to be merged so leaving approved 👍
Feel free to merge if you think is ready or let me know if you would like to do any further change following the comments I left
@@ -1,5 +1,16 @@ | |||
# History of changes for Spyder 6 | |||
|
|||
## Version 6.0.3 (Unreleased) |
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.
As a follow up thing, maybe it could be worthy to add some instructions over the contributing guide mentioning that if an implementation/PR does API changes or any other change that should be featured over the changelog such change should be added as an entry over the CHANGELOG file as part of the changes the PR does?
if PYQT5 or PYQT6: | ||
super().__init__(parent) | ||
else: | ||
QFontComboBox.__init__(self, parent) | ||
_SpyderComboBoxMixin.__init__(self) |
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.
Maybe adding a reference on why this is needed for PySide 2/6 could be worthy
self.preview_editor.set_scrollpastend_enabled(False) | ||
|
||
preview_interface_label = QLabel(_("Interface font")) | ||
self.preview_interface = QLabel("Happy Spydering!") |
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.
Checking the QFontDialog
seems like you are able to edit the text inside the preview widget for a font when using it:
I think it kind of make sense to allow users to edit the text since maybe they would like to check how other characters not visible in the preview default text could look. Also, since the preview for the monospace font can be edited, it also kind of makes sense for the other preview to be editable too, no? What do you think?
Also, although I kind of understand trying to be appealing by using the Happy Spydering!
text, maybe a more standard text like the selected font's name or using a translatable text as Interface Font Sample
or Sample
or even AaBbYyZz
could make sense? I'm fine with that text but sharing some alternatives just in case
Description of Changes
Visual changes
New interface font preview
Editor preview is automatically updated
Issue(s) Resolved
Fixes #22683
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: @ccordoba12