Skip to content
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 an instance of SimpleCodeEditor to print files (Editor) #18808

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented Jul 24, 2022

Description of Changes

  • This allows us to always use a light syntax highlighting theme when printing.

  • The Print preview looks like this now

    imagen

Issue(s) Resolved

Fixes #2521.

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

This allows us to always use a light syntax highlighting theme when
printing.
@ccordoba12 ccordoba12 added this to the v5.3.3 milestone Jul 24, 2022
@ccordoba12 ccordoba12 requested a review from dalthviz July 24, 2022 16:30
@ccordoba12 ccordoba12 self-assigned this Jul 24, 2022
@ccordoba12
Copy link
Member Author

ccordoba12 commented Jul 24, 2022

As you can see, I decided to use the IDLE theme for this because I think it's the sharpest one among the light themes we have, but I'm not so sure about it.

@dalthviz, what do you think?

@dalthviz
Copy link
Member

Should there be an option/preference to enable choosing which light theme to use when printing? Besides that I'm not sure which could be the best light theme. Maybe we could check which light theme provides the most contrast or some other measure to make a decision.

@ccordoba12
Copy link
Member Author

ccordoba12 commented Jul 26, 2022

Should there be an option/preference to enable choosing which light theme to use when printing?

I thought about that, but I think we can leave it for another PR in case users ask for it.

Besides that I'm not sure which could be the best light theme. Maybe we could check which light theme provides the most contrast or some other measure to make a decision.

That's what I did and concluded that the best one is IDLE. Could you do the same and tell me what you think?

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ccordoba12 ! Checking locally on Windows seems like this is working as expected 👍

Regarding the syntax theme, checked with this page (https://webaim.org/resources/contrastchecker/) the contrast between the themes colors (as foreground) and #ffffff (as background) and seems like Scintilla has better contrast mostly since IDLE has the #ff7700 color which fails the check (even with bold letters).

Just in case this is how they look in comparison (Scintilla left, IDLE right):

imagen

So what do you think?

@ccordoba12
Copy link
Member Author

ccordoba12 commented Jul 26, 2022

Regarding the syntax theme, checked with this page (https://webaim.org/resources/contrastchecker/) the contrast between the themes colors (as foreground) and #ffffff (as background) and seems like Scintilla has better contrast mostly since IDLE has the #ff7700 color which fails the check (even with bold letters).

Great thinking! I'll change it to use the Scintilla theme then.

@dalthviz dalthviz merged commit 17e764a into spyder-ide:5.x Jul 26, 2022
dalthviz added a commit that referenced this pull request Jul 26, 2022
@ccordoba12 ccordoba12 deleted the issue-2521 branch July 26, 2022 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants