Add support for configurable transparent background to SVGs
Summary: SVGs do not honor the "Transparent background" config option, and simply have no background at all. This patch ensures this option is applied to SVGs as well as raster images. Unlike `RasterImageView` that uses a `QPixmap` buffer (`mCurrentBuffer`) for drawing the background and the image, SVGs are rendered directly on top of `SvgImageView` (`QGraphicsWidget`). Therefore we just paint the background in `SvgImageView::paint` which happens before the SVG is rendered. We move the checkboard texture code to `AbstractImageView` now that it's used by both subclasses `RasterImageView` and `SvgImageView`. This patch also configures kconf_update due to the moving of the above enum. Since I didn't want to litter `/app` with files, I've moved the update files to `/kconf_update`. Fixes T8125 Before: {F5764298} After: {F5764299} {F5764300} Test Plan: - Open an SVG with solid color config option - Open and SVG with checkboard background con...
parent
d0d97b8e
Please register or sign in to comment