vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Sticky Scroll Shadow/Border Customization

Open demipixel opened this issue 3 years ago • 10 comments

Especially in dark mode, it can be easy to miss that there's a shadow there (maybe I'm just blind).

Relavent section:

https://github.com/microsoft/vscode/blob/f1458c0b4cbec35a219a237f031c1a1ad1e711c1/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.ts#L343

Would love if the box shadow and/or bottom-border was customizable in the theme.

demipixel avatar Aug 05 '22 01:08 demipixel

I recently learned of editorStickyScroll.background which you can put in your theme, and I think it helps a lot, but I'll leave this ticket open since it would be a nice QoL and doesn't seem like it would be super difficult.

demipixel avatar Aug 06 '22 21:08 demipixel

For what it's worth I can see the shadow quite clearly (even in your screenshot).

You probably aren't blind :sweat_smile: - rather I think your monitor's gamma may be set a bit dark (or your monitor is bad at colour reproduction, or you work in weird lighting conditions, or or or).

If you're on windows you could run "Calibrate display color" and see if that helps. Even if it's just to test out my theory (mess around with the gamma slider to check things out, and then hit cancel). You may also be able to set gamma in your monitor's OSD.

I still think this is a worthwhile request though!

Staindk avatar Aug 08 '22 08:08 Staindk

You can already modify that theme value in your settings. It's using the scrollbar.shadow which also applies to the breadcrumbs, the explorer, and likely other locations the app. Might not be worth adding a specific shadow property for this feature and stick to relying on the same scroll shadow that's used everywhere depending on the demand?

{
  "workbench.colorCustomizations": {
    "scrollbar.shadow": "#ff0000"
  }
}

jjspace avatar Aug 08 '22 16:08 jjspace

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa avatar Aug 08 '22 18:08 vscodenpa

With Gruvbox Theme - Visual Studio Marketplace, I can't make out a shadow at all, on two different screens:

image

It looks like that theme defines a scrollbar.shadow which is the same color as editorWidget.background. I quite like the simplicity of it, but here it is confusing... Not sure if that could be considered a bug in the theme though.

I ended up configuring editorStickyScroll.background instead, which I prefer:

image

The-Compiler avatar Aug 11 '22 13:08 The-Compiler

My theme didn't have any shadow either. Good to know about the background option.

trusktr avatar Aug 13 '22 17:08 trusktr

For anyone else just as confused as I am on how to personalize this, you can edit settings.json with the following:

{
  // ...
  "editor.experimental.stickyScroll.enabled": true,
  "workbench.colorCustomizations": {
    "editorStickyScroll.background": "#181a1f",
    "editorStickyScrollHover.background": "#272930"
  }
}

dashed avatar Aug 18 '22 05:08 dashed

Customizing the background color as described does make this feature more usable under my color theme, but I'd still appreciate the ability to make a harder border than I currently have.

jibbers42 avatar Sep 01 '22 18:09 jibbers42

I would prefer showing ... lines per level. I think that would be much more intuitive comparing to current shadow style, even if it takes larger spaces.

class Foo
    [...]
    hello
        world
        [...]
_________________________
        some other code

vilicvane avatar Sep 04 '22 04:09 vilicvane

I am using the high contrast dark mode that comes with VSCode, one would expect that one to have a visible difference between the sticky scroll and the rest of the code. I fixed it in my editor with editorStickyScroll.background as many mentioned. It would be great if it was fixed for everyone since it is a theme that comes with the editor

aguscha333 avatar Sep 21 '22 12:09 aguscha333

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa avatar Sep 28 '22 03:09 vscodenpa

Thanks for sharing the trick! At the end the best result is by changing the background.

 "workbench.colorCustomizations": {
    "editorStickyScroll.background": "#000000",
    "editorStickyScrollHover.background": "#272930"
  }

Thanks again! mario

crystalfp avatar Dec 13 '22 15:12 crystalfp