microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.58k stars 29.03k forks source link

Borders styles for selection and word highlight #45479

Closed svipas closed 6 years ago

svipas commented 6 years ago

Currently border style for selection and word highlight are dotted. It's possible to make it like it's with findMatchBorder which is straight lines?

Selection (editor.selectionHighlightBorder)

image

As you can see it's dotted.

Word highlight (editor.wordHighlightBorder/editor.wordHighlightStrongBorder)

image

As you can see it's dotted.

Find match (editor.findMatchBorder)

image

As you can see border lines are straight, this is how it needs to look like in selection and word highlight borders.

svipas commented 6 years ago

Same problem is with editor.findMatchHighlightBorder. As I can see only editor.findMatchBorder is working as expected.

MilyMilo commented 6 years ago

Same issue on ubuntu 17.10, since the recent update (1.21) the styling's been broken.

MilyMilo commented 6 years ago

This issue is theme specific, doesn't exist on Monokai or other themes. I reckon this only concerns OneDark Pro.

svipas commented 6 years ago

@MilyMilo This doesn't exist in Monokai because Monokai theme doesn't use border for search since there's no such color specified in theme. As you can see in this issue I'm talking about new colors introduced in VS Code 1.21 which borders text, but the problem is border are dotted instead of straight line. So this isn't OS or theme specified, the problem is VS Code and only one color works properly (editor.findMatchBorder) which uses lines for border instead of dots.

svipas commented 6 years ago

https://github.com/Microsoft/vscode/blob/7de696a202a4808f8fb0429e4a665e9b7bc41c41/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts#L522

I found here it's dotted. Should I make a PR in proper places to change from dotted to solid?

/cc @kieferrm @alexandrudima

svipas commented 6 years ago

I also see findMatchBorder is 2px while others are 1px. Is that correct? I would also like to suggest to use border solid for findMatchHighlightBorder.

/cc @kieferrm @alexandrudima

svipas commented 6 years ago

image

With different border styles, we get this issue above in the screenshot. We definitely need solid style. Right now it looks like garland :D

svipas commented 6 years ago

@bpasero since you're working with colors, what do you think? The idea is from Atom with highlight-selected plugin. It's really weird to see the dotted or dashed border styles. If needed I can create a PR.

alexdima commented 6 years ago

We can do solid border styles for anything except high contrast. In the high contrast theme, the same color is used for all of these decorations and the only distinguishable trait is the border style.

svipas commented 6 years ago

@alexandrudima I'm very happy!!!

If you want I can create a PR.

alexdima commented 6 years ago

:+1: for a PR

svipas commented 6 years ago

@alexandrudima Thanks. I will start to work on it right now!

svipas commented 6 years ago

@alexandrudima Already done in https://github.com/Microsoft/vscode/pull/46956. Please review ☺️

If everything is OK with PR please include it in next release (1.22.0).

kieferrm commented 6 years ago

@svipben this won't make it into 1.22. Only critical fixes at this point.

svipas commented 6 years ago

@kieferrm Maybe 1.22.1? Anyways thanks for explaining it, I really appreciate your and your team work on VS Code. ❤️