Skip to content

Scale embedded graphics with text and add click-to-enlarge previews #28

Description

@arvearve

When increasing or decreasing document text size, embedded images and Mermaid diagrams retain their previous dimensions. This makes graphics disproportionately small and their labels difficult to read beside enlarged text.

Reproduction

  1. Open a Markdown document containing text, a table, a PNG, and a Mermaid diagram.
  2. Use View → Bigger or Smaller while keeping the window size fixed.
  3. Compare the graphics and their labels with the surrounding text.

Expected behavior

  • Images, image captions, and Mermaid diagrams scale with the document text.
  • Inline graphics retain their aspect ratio and stay within the document column. Reducing text size also shrinks graphics that were fitted to a narrow column.
  • Clicking an image or diagram opens a preview fitted to the available window.
  • Escape or Done dismisses the preview; Mermaid retains its zoom controls.

The implementation will include a sample Markdown document and regression checks for scaling and preview sizing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions