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

use border-bottom instead of box-shadow for underline cursor #4584

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

dlech
Copy link
Contributor

@dlech dlech commented Jul 5, 2023

In rare cases, box-shadow can cause aliasing artifacts on the top and sides of the cursor box when only the bottom should be filled in to create an underline.

This replaces the box-shadow style with border-bottom which should be pixel perfect in all cases.

Fixes: #4580

In rare cases, box-shadow can cause aliasing artifacts on the top and
sides of the cursor box when only the bottom should be filled in to
create an underline.

This replaces the box-shadow style with border-bottom which should be
pixel perfect in all cases.

Fixes: xtermjs#4580
@Tyriar
Copy link
Member

Tyriar commented Aug 1, 2023

@jerch want to check this one out considering your work on #4605?

@Tyriar Tyriar assigned Tyriar and jerch and unassigned Tyriar Aug 1, 2023
@jerch
Copy link
Member

jerch commented Aug 1, 2023

@jerch want to check this one out considering your work on #4605?

Can do that. Though I wonder, why it was done with an inset box-shadow in the first place 🤔

@Tyriar
Copy link
Member

Tyriar commented Aug 1, 2023

Can't remember... Maybe just to ensure it stays within the cell?

Copy link
Member

@jerch jerch left a comment

Choose a reason for hiding this comment

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

Tested several zoom level (dpr changes) and font sizes - renders crisper than the old approach for certain settings. Could not find any glitch either.

@jerch jerch merged commit 73e6058 into xtermjs:master Aug 1, 2023
@dlech dlech deleted the fix-underline-style branch August 1, 2023 17:15
@Tyriar Tyriar added this to the 5.3.0 milestone Sep 7, 2023
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.

Use of box-shadow for underline cusor can have aliasing issues under certain conditions
3 participants