Open BTWS2 opened 4 years ago
I think the default colorscheme depends on your OS theme, as my reading activities & descriptions are already in dark mode (even when using a VSC light theme).
I'm not sure if it's possible to do set a custom theme for a specific window & have it dynamically change via code, but I'll check the docs, I expect it to have support somewhere.
EDIT: Quote from the VSC docs:
By default, the theme is stored in your user settings and applies globally to all workspaces. You can also configure a workspace specific theme. To do so, set a theme in the Workspace settings.
Seems like it should already be following your VSC theme, so it's rather strange that it doesn't. It does seem to have API support though so I'll look into this tomorrow.
I didn't express myself well. I was referring to this feature on the Dodona website:
This changes the content to dark mode (I don't mean the color scheme of VS code itself). In my screenshot the VS Code IDE is in dark mode, but the activity description or reading activities are not in dark mode. It would be nice if the extension had a similar feature to change the content to dark mode. I think it's same content with a different css file.
You're right, the content changes to dark mode if you enable it in the OS:
This is the desired result, but without having to enable it in the OS, but with a toggle in the extension settings (just like on dodona.ugent.be). The VS Code color theme and mode (light/dark) of the content are independent and the user can choose both.
The VS Code color theme and mode (light/dark) of the content are independent and the user can choose both.
That indeed makes more sense. In case it has API support it should be doable then.
I found this on https://code.visualstudio.com/docs/getstarted/settings
// If set, automatically switch to the preferred color theme based on the OS appearance.
"window.autoDetectColorScheme": false,
A similar setting should be somehow overridden with dark/light depending on the toggle in the extension settings.
Edit: https://code.visualstudio.com/api/references/vscode-api#window
Current scenario:
auto
: light/dark Dodona content pages depending on settings in OSProposed scenario:
auto
(default): dark Dodona content pages if dark mode in settings in OS or chosen theme in VS Code is dark, otherwise light Dodona content pageslight
: user wants light Dodona content pages in all circumstancesdark
: user wants dark Dodona content pages in all circumstancesMaybe this is helpful? https://stackoverflow.com/questions/37257911/detect-light-dark-theme-programmatically-in-visual-studio-code
Is it possible to have the same dark mode as the Dodona website for activity descriptions and reading activities?
Dark mode can be a toggle in the settings, but shouldn't be the default.
VS Code:
Dodona webpage: