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

Theme detection failing #35

Open
mitchcapper opened this issue Apr 12, 2024 · 3 comments
Open

Theme detection failing #35

mitchcapper opened this issue Apr 12, 2024 · 3 comments

Comments

@mitchcapper
Copy link

Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview
Version 17.10.0 Preview 2.0

use light theme by default after extension install though clearly defaulting to dark theme:

image

I see I can manually adjust each color but no manual theme selection.

@MagicAndre1981
Copy link

I have the same issue with the blue theme

@Tim-Maes
Copy link
Owner

I am aware of these issues, but haven't found the time to work on this project yet.

I'll try to implement an elegant way to handle themes, but that will probably be somewhere in september. In the meantime, feel free to open a PR - the logic for this is pretty simple (and was a quickfix implementation) here in the package file.

@MagicAndre1981
Copy link

MagicAndre1981 commented Aug 21, 2024

the main issues is you hardcoded color values in strings

internal const string DarkTheme = "Color [A=255, R=31, G=31, B=31]";
internal const string LightTheme = "Color [A=255, R=245, G=245, B=245]";

If there is a minimal diff the compare fails (my detected values are Color [A=255, R=247, G=249, B=254] and this is why compare failed).

Small workaround is to basically change the compare in VSColorTheme_ThemeChanged to check for Dark instead of Light theme:

if (themedColor == Constants.DarkTheme)
    SetDarkThemeColors();
else
    SetLightThemeColors();

When I switch between buildin themes, it works now, but the light colors are still not that great to read.

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

No branches or pull requests

3 participants