Add 5% transparency threshold for checkerboard toggle button

What does this MR do and why?

Add 5% transparency threshold for checkerboard toggle button

The checkerboard toggle button previously appeared whenever any transparent pixel was detected, including images with only negligible transparency artifacts. This confused users as the toggle produced no visible change.

Changelog: changed

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Go to any editor, and add some PNGs (or WebP or GIF) with some transparent px. Find examples below
  2. The toggle button will only be shown on hover than there are at least 5% transparent px

Image with 5% transparency

5_percent

Image with 4.95% transparency

495percent

Image of the bug report

image__2_

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #595027 (closed)

Edited by Vanessa Otto

Merge request reports

Loading