Repository navigation
Match the Windows pixel magnifier on Linux - #12
Merged
Merged
Conversation
The loupe scaled a filtered patch and slid off the cursor pixel at the edge of the frame. It now draws a 15 by 15 nearest-neighbor grid, keeps the center cell on that pixel, and shows the color.
# Conflicts: # .github/workflows/build.yml # PARITY.md # README.md # linux/OverlayWindow.cs
Merged
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.
What changed
The Linux snip magnifier matches the Windows loupe.
#RRGGBBwith that pixel's coordinate.PARITY.mdlists every Windows feature against this branch.Windows behavior is unchanged.
Why
The Linux loupe stretched a filtered patch of the screen, so neighboring pixels blended, and the crosshair slid off the real pixel once the cursor reached the edge. Windows shows the pixels themselves and the color.
The window-grab PR adds a hex label on the old scaled loupe and rewrites
DrawMagnifier. This branch replaces that loupe. When both merge, keep the grid and keep the window-hit code from that PR.How it was tested
dotnet test tests/OpenSnip.Tests/OpenSnip.Tests.csproj -c Release— 15 passed. The tests check the center cell, the edge (the center does not slide), the#RRGGBBlabel, placement, and that a scaled cell stays a solid block.dotnet build src/OpenSnip.csproj -c Release -p:EnableWindowsTargeting=true— succeeded, 0 warnings.src/is unchanged.DISPLAY=:1, 1920×1200): a one-pixel red dot in a blue window. With the pointer on that dot, the loupe showed an 8×8 block of pure red (the center cell inside its outline) and a pure blue cell on the diagonal. 164 pure-red pixels, the red interior plus the 10×10 swatch.