Skip to content

Add preview pane to the quick paste window, with summary footer and f… - #1148

Open
vildenH wants to merge 1 commit into
sabrogden:masterfrom
vildenH:preview-pane-improvements
Open

vildenH wants to merge 1 commit into
sabrogden:masterfrom
vildenH:preview-pane-improvements

Conversation

@vildenH

@vildenH vildenH commented Sep 14, 2026

Copy link
Copy Markdown

About this PR

Hi, and thank you for Ditto — I use it every day. This PR comes from my own personal
use case: I wanted to see what a clip actually contains before pasting it, so I built
a preview pane for the quick paste window, plus a quick way to view an image clip at
full size. I'm offering it upstream in case others find it useful too.

I'm not sure whether this fits the direction or conventions of the project, so please
treat it as a proposal — if anything should be different (scope, approach, naming),
just tell me and I'll gladly adjust or split it up. Full disclosure: the code was
written with the help of an AI coding assistant, with me reviewing, building, and
manually testing every change. I understand completely if that's not acceptable here.

What it does

  1. Preview pane – a new pane beside the clip list, built only from standard
    controls (rich edit + static bitmap). Shows the clip's type, representative format
    size (not the misleading sum of all stored formats), character count (emoji count
    as one), text or file-list content, and an image thumbnail. Theme-aware colors,
    hover-delayed scrollbar, flicker-free updates; can be placed left of the list with
    golden ratio / 5:5 width options. Text prefers CF_UNICODETEXT over CF_TEXT to avoid
    mojibake.

  2. Pinned summary footer – the type/size/count summary lives in a small footer bar
    pinned to the bottom of the pane, always visible while scrolling.

  3. Quick-Look style image viewer – clicking the thumbnail opens the original image
    (PNG preferred, then DIB) centered on a dimmed full-monitor overlay, fit to 85% of
    the monitor, never upscaled. Esc / Space / Enter / click / focus loss closes it.

New UI strings go through the language system with English fallbacks; Simplified
Chinese translations are included.

Testing

Built Debug|x64 and Release|x64 (CP_Main_10.sln) with VS 2022; manually verified text,
rich text, file and image clips, thumbnail rendering across sizes, viewer open/close
via mouse and keyboard, and that the quick paste window stays open while viewing.

…ull image viewer

- New preview pane beside the clip list (standard controls: rich edit + static bitmap), showing clip type, representative format size, character count, text/file content, and an image thumbnail; can sit on the left of the list with golden ratio / 5:5 width options

- Pinned summary footer; CF_UNICODETEXT preferred over CF_TEXT to avoid mojibake; theme-aware colors; hover-delayed scrollbar; flicker-free updates

- Clicking the thumbnail opens a Quick Look style full-monitor viewer of the original image (Esc/Space/Enter/click/focus-loss closes it)

- New UI strings via the language system with English fallbacks; Simplified Chinese translations included

This branch has not been deployed

No deployments
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.

1 participant