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

Settings reset in VS2017 break colors in Dark theme #2555

Closed
sergey-tihon opened this Issue Mar 8, 2017 · 10 comments

Comments

Projects
None yet
3 participants
@sergey-tihon
Contributor

sergey-tihon commented Mar 8, 2017

In VS2017 all functions, members and properties are colored in black on dark background by default.

screen shot 2017-03-08 at 10 19 58 pm

I have this issue since VFPT and I have tried to reset all VS settings to default values for all collection of settings (Strange that we do not have F# settings collection yet.)
screen shot 2017-03-08 at 10 18 19 pm

Expected behavior

F# should look nice and readable on all 3 themes supported by VS

Actual behavior

Default colors are very strange

screen shot 2017-03-08 at 10 08 28 pm

screen shot 2017-03-08 at 10 08 41 pm

Known workarounds

Manually modify colors for F# Functions / Methods and F# Properties for Text editor.

Related information

//cc @vasily-kirichenko Could you please change theme to the Dark and share the colors that you see in settings for F# Functions & F# Properties? Thx

@saul

This comment has been minimized.

Contributor

saul commented Mar 8, 2017

I believe this was been fixed in #2450. But considering you're on master, that's a bummer.

cc @majocha to take a look at this.

@sergey-tihon

This comment has been minimized.

Contributor

sergey-tihon commented Mar 8, 2017

I did repeat all steps from this manual only again just now (with current master) and it seems that it works for me now...

Let's assume it's magic

@sergey-tihon

This comment has been minimized.

Contributor

sergey-tihon commented Mar 9, 2017

Just for history:

Visual F# Tools reinstall helped me after VS settings reset.
Maybe Visual F# Tools calculate colors on 1st run? That's why settings reset did not help me...

@majocha

This comment has been minimized.

Contributor

majocha commented Mar 9, 2017

@sergey-tihon you are right there's a bug right now. Resetting the colors will break the dark mode :( I'll try to think about a solution.

@sergey-tihon sergey-tihon changed the title from Unreadable code colors in VS2017 using Dark theme to Settings reset in VS2017 break colors in Dark theme Mar 9, 2017

@sergey-tihon

This comment has been minimized.

Contributor

sergey-tihon commented Mar 9, 2017

Thank you @majocha, so I reopen this issue to keep tracking.

@sergey-tihon sergey-tihon reopened this Mar 9, 2017

@majocha

This comment has been minimized.

Contributor

majocha commented Mar 9, 2017

I must find a consistent repro, though. I've seen it once and now it's gone.

@sergey-tihon

This comment has been minimized.

Contributor

sergey-tihon commented Mar 9, 2017

@majocha Do you know any reason why we do not have Visual F# settings collections with all F# related setting the that we can import/export/reset independently? Like C#, VB, C++ & JS do?

screen shot 2017-03-08 at 10 18 19 pm

@majocha

This comment has been minimized.

Contributor

majocha commented Mar 9, 2017

@sergey-tihon I suspect it's because as for now there are no F# option pages apart from F# Interactive which is done in an interesting way. I tried to make an option page leveraging Roslyn but it seems we're blocked by some old dependencies that need to be updated first to make it work.

@majocha

This comment has been minimized.

Contributor

majocha commented Mar 9, 2017

I think I got a repro for the color problem. I'll think how to deal with it best.
Looks like something changed in the Fonts and Colors handling in Visual Studio RTM :(

@majocha

This comment has been minimized.

Contributor

majocha commented Mar 9, 2017

OK, simple repro for the record:

  1. Install master
  2. Set fonts & colors to default
  3. Change theme from light to dark (or from dark to light)
  4. Restart Visual Studio

The reason for this bug is that Visual Studio stores formats registered with EditorFormatDefinition and uses this stored versions. After that it does instantiate FormatDefinitions at each run but doesn't use the styles set in their constructors anymore. There is a simple fix for this that I will post soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment