Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Propagate font settings from JetBrains to webview#2654

Merged
pkukielka merged 2 commits intomainfrom
pkukielka/fix-font-settings-in-webview
Nov 18, 2024
Merged

Propagate font settings from JetBrains to webview#2654
pkukielka merged 2 commits intomainfrom
pkukielka/fix-font-settings-in-webview

Conversation

@pkukielka
Copy link
Copy Markdown
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 https://github.com/sourcegraph/cody/pull/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
Copy Markdown
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
Copy Markdown
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-public-snapshot 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
@pkukielka pkukielka deleted the pkukielka/fix-font-settings-in-webview branch November 18, 2024 09:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants