Block transparent colors without allowTransparency#2
Merged
bgw merged 1 commit intocolor-parsingfrom Mar 30, 2018
Merged
Conversation
Fixes xterm/xterm.js#1357.
Tyriar
reviewed
Mar 29, 2018
| return { | ||
| css, | ||
| rgba: data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3] | ||
| rgba: (data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]) >>> 0 |
Owner
Author
There was a problem hiding this comment.
Coerces it to an unsigned int. There's some comments about this earlier in the file.
It's not really necessary (the bits are the same), but tends to make the resulting value more legible.
| this.colors.cursor = this._parseColor(theme.cursor, DEFAULT_CURSOR); | ||
| this.colors.cursorAccent = this._parseColor(theme.cursorAccent, DEFAULT_CURSOR_ACCENT); | ||
| this.colors.selection = this._parseColor(theme.selection, DEFAULT_SELECTION); | ||
| this.colors.cursor = this._parseColor(theme.cursor, DEFAULT_CURSOR, true); |
There was a problem hiding this comment.
Shouldn't the cursor use this.allowTransparency?
Owner
Author
There was a problem hiding this comment.
The cursor is drawn on a separate transparent render layer, so it should be possible to use a transparent cursor without allowTransparency, similar to how you can do a transparent selection.
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes xtermjs#1357.
cc @Tyriar
I could probably add a test with some more mocking, but I'd rather try to get the
node-canvasstuff in #1 landed.