Repository navigation
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.
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.
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.