SVG images that rely solely on a viewBox attribute (without explicit
width/height) could not be zoomed in the image preview because they
have no intrinsic dimensions. CSS zoom had no effect since the SVG
would simply re-render to fill whatever container size it was given.
- Set explicit minWidth/minHeight on the image element when
naturalWidth/naturalHeight are 0, giving CSS zoom concrete pixel
dimensions to scale
- Handle firstZoom() division by zero when naturalWidth is 0 by
defaulting to scale 1x
- Clear explicit dimensions when returning to scale-to-fit mode
Fixes#240638
The transparency checkerboard pattern in the image preview used two
overlapping linear-gradient(45deg, ...) backgrounds with offset
positions. At certain zoom levels, subpixel rendering caused visible
triangular artifacts at the gradient boundaries.
Replace with a single conic-gradient per theme, which creates a clean
four-square checkerboard tile without diagonal edges, eliminating
the rendering artifacts at all zoom levels.
Closes#229565
* feat: adding options to support videos looping and auto playing
Signed-off-by: Fawzi Abdulfattah <iifawzie@gmail.com>
* chore: adding on mute to the videos auto play setting's description
Signed-off-by: Fawzi Abdulfattah <iifawzie@gmail.com>
---------
Signed-off-by: Fawzi Abdulfattah <iifawzie@gmail.com>
* Support copying non-pngs and wait for focus to avoid race conditions
* Remove the temporary canvas element after copying
* Update to place entire canvas creation inside promise.
* Increasing to 5 retries 20ms apart
Allow copying image from image preview
Fixes#171616
Lets you cmd+c / right click to copy images from the image preview
Also disables the copy/paste options in the other media previews since they don't currently support copying