Bug 364822 - SVGs are not zoomed to fit
Summary: SVGs are not zoomed to fit
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: Other (add details in bug description)
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL: http://i.imgur.com/a4x1Yiu.png
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 16:24 UTC by andydecleyre
Modified: 2018-03-01 23:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 17.12.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andydecleyre 2016-06-27 16:24:54 UTC
Gwenview 16.04.2 fails to enlarge SVGs, as attempted either by toggling the "Fit" button or selecting "Autofit each image" and "Enlarge smaller images" in the settings.

View: http://i.imgur.com/a4x1Yiu.png
Settings: http://i.imgur.com/g5y3j7c.png


Reproducible: Always

Steps to Reproduce:
1. "Autofit each image" and "Enlarge smaller images" in the settings
2. Open an SVG

OR

1. Open an SVG
2. Toggle on the Fit button

Actual Results:  
The SVG is displayed in its "original" small size.

Expected Results:  
The SVG should be enlarged to fit the available space, as is the behavior with other image formats.

I'm using

- Arch Linux
- qt5-imageformats 5.7.0
- kimageformats 5.23.0

I do not have kipi-plugins installed.
Comment 1 Nate Graham 2017-09-08 19:04:03 UTC
Confirmed. I suspect that there are a lot of people who would blow a blood vessel if this behavior were enabled, though...
Comment 2 andydecleyre 2017-09-10 16:05:56 UTC
(In reply to Nate Graham from comment #1)
> Confirmed. I suspect that there are a lot of people who would blow a blood
> vessel if this behavior were enabled, though...

Why would someone who explicitly turns on auto fit, or someone who deliberately hits the auto fit button, blow a blood vessel if the program were to do what they asked?
Comment 3 null 2018-03-01 23:27:35 UTC
Git commit 9b1714fc7b50be746f39e835c8b3146c38a9ddd9 by Henrik Fehlauer.
Committed on 01/03/2018 at 23:27.
Pushed by rkflx into branch 'Applications/17.12'.

Enlarge small SVGs too

Summary:
For images smaller than the viewport at 100% zoom, Gwenview allows to
scale up the image to {nav Fit} the window if {nav Enlarge smaller images}
is checked in the configuration dialog. So far this only worked for
raster-based images, but not for SVGs.

`mEnlargeSmallerImages` is meant to be handled by the abstract base
class `AbstractImageView`, however when f00cef3c0 moved code over there
from `RasterImageView`, it was missed to also adapt `SvgImageView`. This
can be fixed by implementing the missing function.

In addition, a left-over `bool` is removed.
FIXED-IN: 17.12.3

Test Plan:
- Open `icons/hisc-apps-gwenview.svgz`, press {nav Fit}: Small icon shown.
- Check {nav Enlarge smaller images}, press {nav Fit} again: Icon scaled up to fit window.
- Enlarging raster-based images still works fine.

Reviewers: #gwenview, huoni, muhlenpfordt, ngraham

Reviewed By: #gwenview, huoni, muhlenpfordt, ngraham

Subscribers: ngraham, muhlenpfordt, huoni

Differential Revision: https://phabricator.kde.org/D10926

M  +0    -2    lib/documentview/rasterimageview.cpp
M  +6    -0    lib/documentview/svgviewadapter.cpp
M  +2    -0    lib/documentview/svgviewadapter.h

https://commits.kde.org/gwenview/9b1714fc7b50be746f39e835c8b3146c38a9ddd9