ZIm/crates/markdown_preview/src
Mikayla Maki 38afae86a9
Use buffer size for markdown preview (#29172)
Note:

This is implemented in a very hacky and one-off manner. The primary
change is to pass a rem size through the markdown render tree, and scale
all sizing (rems & pixels) based on the passed in rem size manually.
This required copying in the `CheckBox` component from `ui::CheckBox` to
make it use the manual rem scaling without modifying the `CheckBox`
implementation directly as it is used elsewhere.

A better solution is required, likely involving `window.with_rem_size`
and/or _actual_ `em` units that allow text-size-relative scaling.

Release Notes:

- Made it so Markdown preview uses the _buffer_ font size instead of the
_ui_ font size.

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Nate Butler <nate@zed.dev>
2025-04-21 19:29:21 -04:00
..
markdown_elements.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
markdown_parser.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
markdown_preview.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
markdown_preview_view.rs Use buffer size for markdown preview (#29172) 2025-04-21 19:29:21 -04:00
markdown_renderer.rs Use buffer size for markdown preview (#29172) 2025-04-21 19:29:21 -04:00