Repository navigation
Conversation
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.
Opening an image translation result in Compact mode on a lower-DPI secondary monitor can clip the image and place the toolbar outside the window. This reproduces on current upstream
main(1ee02821).Reproduction
With a prepared 600×300 image, the unmodified production window ends up at 256×151 physical pixels, while its image control remains 600×300 and the toolbar starts 306 pixels below the window top. The content is clipped by the undersized outer window.
Change
Only
src/STranslate/Views/ImageTranslateCompactWindow.xaml.cschanges: 14 lines added, 0 removed, including comments and blank lines. The fix reuses two existing layout helpers.The initial physical positioning in
OnSourceInitializeddoes not survive the subsequent DPI size adjustment in this mixed-DPI startup scenario. The new override resynchronizes the existing window bounds and child layout after the first content render. It does not recompute the layout or remeasure the toolbar.The added override, with comments omitted, is:
The same 600×300 image now has a 641×378 outer window, fully containing the image and toolbar. The image and toolbar geometry remains unchanged.
Validation
mainand the candidate using the compiled production Compact window with prepared bitmaps on the actual 250%/100% dual-monitor desktop; no OCR or translation services were invoked by this harness.Note: Because this correction runs after the first content render, resizing the visible window can cause a brief flicker during initial display. A more complete solution may require changing the initialization order so that target-monitor DPI handling and layout synchronization finish before the window is shown.