Repository navigation
Use theme preference from IDE when embedded instead of preference - #6581
Merged
Merged
Conversation
Currently the theme always comes from the preference and ignores what the IDE passes. Since there's no way to un-set the preference (or change it in the UI when embedded) this may prevent it matching the IDE. This change always uses the IDE preference when embedded. It requires a change in VS Code to pass embed=true when embedding the sidebar since this was missing originally.
| @@ -16,12 +16,14 @@ final class IdeTheme { | |||
| this.foregroundColor, | |||
Member
There was a problem hiding this comment.
are we even using the backgroundColor and foregroundColor in this class?
Contributor
Author
There was a problem hiding this comment.
Yep, it's used around here:
It only gets set from the querystring if it's dart/light enough (since in VS Code we read it from the theme that we have no control of), and then in the code above we override the colour to that (so that it more closely matches your IDE theme).
kenzieschmoll
approved these changes
Oct 24, 2023
kenzieschmoll
pushed a commit
that referenced
this pull request
Nov 16, 2023
) * Use theme preference from IDE when embedded instead of preference Currently the theme always comes from the preference and ignores what the IDE passes. Since there's no way to un-set the preference (or change it in the UI when embedded) this may prevent it matching the IDE. This change always uses the IDE preference when embedded. It requires a change in VS Code to pass embed=true when embedding the sidebar since this was missing originally.
kenzieschmoll
pushed a commit
that referenced
this pull request
Nov 17, 2023
) * Use theme preference from IDE when embedded instead of preference Currently the theme always comes from the preference and ignores what the IDE passes. Since there's no way to un-set the preference (or change it in the UI when embedded) this may prevent it matching the IDE. This change always uses the IDE preference when embedded. It requires a change in VS Code to pass embed=true when embedding the sidebar since this was missing originally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the theme always comes from the preference and ignores what the IDE passes. Since there's no way to un-set the preference (or change it in the UI when embedded) this may prevent it matching the IDE.
This change always uses the IDE preference when embedded. It requires a change in VS Code to pass embed=true when embedding the sidebar since this was missing originally.
Fixes #6580
Fixes #5911
Requires Dart-Code/Dart-Code#4812 in a new Dart-Code release to apply.