BeardedBear / bearded-theme

The VS Code theme with a long beard.
GNU General Public License v3.0
534 stars 44 forks source link

Combining an HC and non-HC theme doesn't work with "Toggle Light / Dark Theme"? #130

Open chambliss opened 1 year ago

chambliss commented 1 year ago

Hi,

I opened an issue with VS Code about this, thinking it was a general editor issue, but it turned out to be specific to my Bearded themes. Please see here for the full original issue description and a video illustrating the issue.

After more testing, this combination (both non-HC themes) allows Toggle to work correctly:

{
  "workbench.preferredLightColorTheme": "Bearded Theme Coffee Cream",
  "workbench.preferredDarkColorTheme": "Bearded Theme Arc Blueberry",
}

This one (HC light theme, normal dark theme) doesn't work correctly, and instead causes VS Code to switch to the default HC light theme (theirs), and then to the default HC dark theme, and goes back and forth between those two.

{
  "workbench.preferredLightColorTheme": "Bearded Theme Milkshake Mango",
  "workbench.preferredDarkColorTheme": "Bearded Theme Arc Blueberry",
}

The end result is the minor inconvenience of switching back to using "Preferences: Color Theme" and typing in which theme to use, rather than using the shortcut I had bound to toggling color theme. Not a huge deal but a slight bummer :)

Based on the response I got on the other issue, I believe it's related to using a high-contrast color theme for my light theme and a normal (dark) color theme for my dark theme. I don't fully understand how theming works, but it might be that combining a HC light theme and a non-HC dark theme is just unsupported for this command. If so, feel free to let me know and close this.

P.S. Thanks for making Bearded Themes! I remember Bearded Themes being among the first to ever support semantic highlighting when that was new. I've been using them for many years now. I've made some customizations over time, but they are all incredibly thoughtful and well-designed out of the box.

BeardedBear commented 1 year ago

Hi !

I've had a look at the problem and I know where it's coming from.

When we create a theme for VSCode we can choose between 4 types of themes, (sets in package.json file) :

(yes, it's completely inconsistent)

The problem is that hc-light has a lot of inconsistent behaviour, notably the fact that icon packs that specify icons for light themes behave like icons for dark themes, or certain CSS properties aren't applied in the same way (for example, the background of the active item in the activity bar). So I tried to work around the problem by specifying in my package.json that hc-light icons are considered hc-black icons.

This gives me 2 options:

My slightly manic side can't resign itself to accepting the first solution, so I'm going to take some time this week to create issues to hopefully fix these inconsistencies in future versions of VSCode!

But thank you very much for pointing out the problem, like my work and for being so precise!

chambliss commented 1 year ago

Oh no 😂 I had a feeling it was something like that. It does seem like in general there is less robust support in code editors for light themes (and especially once contrast constraints come into the mix). No worries, I'll continue using my workaround until the situation improves.

Thanks for your quick response!