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

Propagate font settings from JetBrains to webview #2654

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

pkukielka
Copy link
Contributor

@pkukielka pkukielka commented Nov 15, 2024

Fixes:
https://linear.app/sourcegraph/issue/BUGS-462
https://linear.app/sourcegraph/issue/BUGS-342
https://linear.app/sourcegraph/issue/BUGS-220

Test plan

  1. Run this branch with Use font size variable providd by JetBrains in webview cody#6134
  2. Open Settings > Appearance
  3. Tick Use custom font and change font size
  4. Apply changes
  5. You should notice that both editor and webview font size changed

image

val fontSizeVariable =
(toCSSVariableName("font-size") to "${UISettings.getInstance().fontSize}px")

return WebTheme(ThemeUtil.isDarkTheme(), colorVariables + fontSizeVariable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these variables? Strings of css properties?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkukielka added a commit to sourcegraph/cody that referenced this pull request Nov 18, 2024
## Test plan

1. Run this branch with
sourcegraph/jetbrains#2654 (using CODY_DIR and
`:customRunIde`)
2. In IntelliJ open `Settings > Appearance`
3. Tick `Use custom font` and change font size
4. Apply changes
5. You should notice that both editor and webview font size changed
@pkukielka pkukielka merged commit dcfc2d3 into main Nov 18, 2024
6 checks passed
@pkukielka pkukielka deleted the pkukielka/fix-font-settings-in-webview branch November 18, 2024 09:51
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

Successfully merging this pull request may close these issues.

2 participants