Bug 517274 - Magnifier is not always pixel aligned
Summary: Magnifier is not always pixel aligned
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-08 04:33 UTC by kmdest
Modified: 2026-03-13 00:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.3
Sentry Crash Report:


Attachments
My murdered checkerboard. (7.38 KB, image/png)
2026-03-08 04:33 UTC, kmdest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kmdest 2026-03-08 04:33:21 UTC
Created attachment 190469 [details]
My murdered checkerboard.

SUMMARY
Spectacle's magnifier is interpolated with some bilinear-like filter, it makes selecting an exact pixel impossible by turning crisp pixel boundaries into eye-melting mush.

STEPS TO REPRODUCE
1. Use the magnifier in Spectacle, hold shift by default
2. Mouse over a sharp pixel bound (for instance, the micro checkerboard attached)
3. Attempt to figure out where one pixel truly ends
4. Despair because this is extra processing for a worse UX

OBSERVED RESULT
Mush

DESIRED RESULT
Crisp lines, the pixels that really actually were there for real, nearest neighbor interpolation

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux 
KDE Plasma Version: 6.6.2
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2
Kernel Version: 6.19.5-3-cachyos (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 32 GiB of RAM (31.3 GiB usable)
Graphics Processor: AMD Radeon RX 7900 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C56
System Version: 6.0

ADDITIONAL INFORMATION
Comment 1 Noah Davis 2026-03-08 05:06:40 UTC
It's not supposed to be interpolated. We even put `smooth: false` in the ShaderEffectSource that is responsible for the magnification effect. Perhaps ShaderEffectSource does a kind of interpolation on its own in some conditions?
Comment 2 Bug Janitor Service 2026-03-09 01:44:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/spectacle/-/merge_requests/520
Comment 3 Noah Davis 2026-03-11 15:43:06 UTC
Git commit 4a6464641fe456ea6d2471ed2957ab22869ddc36 by Noah Davis.
Committed on 11/03/2026 at 15:42.
Pushed by ndavis into branch 'master'.

Magnifier: Fix graphical size being off by 1 pixel

The previous formula for getting a size from standard Kirigami units left too much room for error, so now we just hardcode a size that will be an odd size when multiplied by 3.

M  +7    -8    src/Gui/Magnifier.qml

https://invent.kde.org/plasma/spectacle/-/commit/4a6464641fe456ea6d2471ed2957ab22869ddc36
Comment 4 Noah Davis 2026-03-11 15:53:28 UTC
Git commit 9204cc60cab00ad9b7f2f5845e5bc86006b558a0 by Noah Davis.
Committed on 11/03/2026 at 15:43.
Pushed by ndavis into branch 'Plasma/6.6'.

Magnifier: Fix graphical size being off by 1 pixel

The previous formula for getting a size from standard Kirigami units left too much room for error, so now we just hardcode a size that will be an odd size when multiplied by 3.


(cherry picked from commit 4a6464641fe456ea6d2471ed2957ab22869ddc36)

Co-authored-by: Noah Davis <noahadvs@gmail.com>

M  +7    -8    src/Gui/Magnifier.qml

https://invent.kde.org/plasma/spectacle/-/commit/9204cc60cab00ad9b7f2f5845e5bc86006b558a0