fsprojects-archive / zzarchive-VisualFSharpPowerTools

[ARCHIVED] Power commands for F# in Visual Studio
http://fsprojects.github.io/VisualFSharpPowerTools/
Apache License 2.0
310 stars 77 forks source link

Fixing an incorrect background color when non-standard theme is used with Depth Colorizer #1365

Closed hmemcpy closed 8 years ago

hmemcpy commented 8 years ago

This fixes #1358

This PR makes several changes to the way theme settings are retrieved. Instead of querying the registry, this relies on the built in VS theming service (available since VS2012). Unfortunately, the public PIA types for this service were never shipped, so a bit of dynamic magic is needed to get the service.

In addition, a refactoring of the default color matrix array - now relies on the background color of the editor, instead of having hardcoded values. Also fixes hardcoded registry access.

hmemcpy commented 8 years ago

Ok, I reverted using the Dynamic dependency, and moved the Reflection (?) operator to common utils. Please review :) @vasily-kirichenko @dungpa

dungpa commented 8 years ago

The PR looks good.

@vasily-kirichenko Could you try this (theme change handling) out in VS 2015 before I merge the PR? Thanks.

vasily-kirichenko commented 8 years ago

@dungpa sure. Let me ten minutes.

vasily-kirichenko commented 8 years ago
  1. Launch VS with the Blue theme.
  2. Switch to the Dark one:

image

  1. Switch to the Blue theme back:

image

dungpa commented 8 years ago

@vasily-kirichenko Thanks. The bug on Functions category shows up again; it may be unrelated.

dungpa commented 8 years ago

@hmemcpy It's a good idea to move all reflections functions into a single place. Thanks for the help.