Closed UziTech closed 3 years ago
Or we can let the syntax themes define the less variables. Then we don't have to guess which scopes have which color.
How would that work? which scopes would we use for each color?
That could work if we had access to all the themes. But at this point in time, we need to find a way to set a reasonable default.
For the "background-color" and "text-color", we can use StyleReader
to set the default color. We should still make it possible for others to override this in the less files if they want to.
The background and text colors already work with the theme variables
background color: @app-background-color
text color: @text-color
selected background color: @background-color-selected
selected text color: @text-color-highlight
These are all standard variables that every ui theme uses
We could also make the standard theme the default.
background color: @app-background-color text color: @text-color selected background color: @background-color-selected selected text color: @text-color-highlight
These are all standard variables that every ui theme uses
The last time I tested this PR, it didn't respect the theme changes. This is how we fixed it in Minimap https://github.com/atom-minimap/minimap/blob/1894eb523070f974c1c368058a6b0f57adb87b48/lib/main.js#L390-L395
currently the terminal is not set to refresh on theme changes but that could be easily implemented without StyleReader
If you close the terminal, change the theme, then open a new terminal the theme should be updated.
Ya I have to fix the tests, add documentation, and add the style change observers.
I should have time tonight or tomorrow for this.
I think this is ready to go.
The last time I tested this PR, it didn't respect the theme changes. This is how we fixed it in Minimap atom-minimap/minimap@
1894eb5
/lib/main.js#L390-L395
Could you add these listeners so the colours reset when the theme changes?
:tada: This PR is included in version 1.1.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Allow themes to specify terminal colors for standard theme.
TODO: