<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>364822</bug_id>
          
          <creation_ts>2016-06-27 16:24:54 +0000</creation_ts>
          <short_desc>SVGs are not zoomed to fit</short_desc>
          <delta_ts>2018-03-01 23:27:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>gwenview</product>
          <component>general</component>
          <version>Other (add details in bug description)</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://i.imgur.com/a4x1Yiu.png</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>AndyKluger</reporter>
          <assigned_to name="Gwenview Bugs">gwenview-bugs-null</assigned_to>
          <cc>AndyKluger</cc>
    
    <cc>myriam</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://commits.kde.org/gwenview/9b1714fc7b50be746f39e835c8b3146c38a9ddd9</cf_commitlink>
          <cf_versionfixedin>17.12.3</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1603782</commentid>
    <comment_count>0</comment_count>
    <who name="">AndyKluger</who>
    <bug_when>2016-06-27 16:24:54 +0000</bug_when>
    <thetext>Gwenview 16.04.2 fails to enlarge SVGs, as attempted either by toggling the &quot;Fit&quot; button or selecting &quot;Autofit each image&quot; and &quot;Enlarge smaller images&quot; in the settings.

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


Reproducible: Always

Steps to Reproduce:
1. &quot;Autofit each image&quot; and &quot;Enlarge smaller images&quot; 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 &quot;original&quot; small size.

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

I&apos;m using

- Arch Linux
- qt5-imageformats 5.7.0
- kimageformats 5.23.0

I do not have kipi-plugins installed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1699814</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2017-09-08 19:04:03 +0000</bug_when>
    <thetext>Confirmed. I suspect that there are a lot of people who would blow a blood vessel if this behavior were enabled, though...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1700351</commentid>
    <comment_count>2</comment_count>
    <who name="">AndyKluger</who>
    <bug_when>2017-09-10 16:05:56 +0000</bug_when>
    <thetext>(In reply to Nate Graham from comment #1)
&gt; Confirmed. I suspect that there are a lot of people who would blow a blood
&gt; 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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1735080</commentid>
    <comment_count>3</comment_count>
    <who name="null">null</who>
    <bug_when>2018-03-01 23:27:35 +0000</bug_when>
    <thetext>Git commit 9b1714fc7b50be746f39e835c8b3146c38a9ddd9 by Henrik Fehlauer.
Committed on 01/03/2018 at 23:27.
Pushed by rkflx into branch &apos;Applications/17.12&apos;.

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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>