https://bugs.kde.org/show_bug.cgi?id=435226

Méven <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/syst
                   |                            |em/dolphin/-/commit/ff51c83
                   |                            |685c3058d8fd501196e090370a5
                   |                            |a46f50

--- Comment #10 from Méven <[email protected]> ---
Git commit ff51c83685c3058d8fd501196e090370a5a46f50 by Méven Car.
Committed on 07/08/2026 at 13:54.
Pushed by meven into branch 'master'.

informationpanel: ask for a preview that fits the panel it is shown in

A preview was asked for at the size the panel happened to have when the item
was
selected, and the viewer drew it centred at its own size, neither growing nor
shrinking it. A panel the user widens therefore gained empty space around a
preview that stayed as it was, and a panel that was narrowed cut it off. A pdf
stayed as small as it was when it was selected however much room it was given,
while an image that was already large enough looked right by chance.

The viewer now draws a preview larger than itself scaled to fit, and asks for
one
of the size it has when it is given more room than the preview it holds was
made
for. Dragging the panel wider resizes it many times over, so nothing is asked
for
while a preview is being made, and the size the viewer has by the time that one
arrives is what is asked for next.

The panel used to answer for this itself, re-showing the item on a resize so
that
the content would ask again 300 milliseconds later. It no longer needs to, and
that path did more than was wanted, since showing an item with nothing selected
stats the folder it is in.

Asking for a preview to be kept, which the panel has opted out of since 2009,
lets it be handed out again for this file until the file changes, which KIO
tells
from the modification time and the size of the file. What that bought is gone:
emitPreview() scales a preview down to the size that was asked for whatever the
scale type, so Unscaled no longer returns the size the preview was made at.

M  +0    -4    src/panels/information/informationpanel.cpp
M  +34   -2    src/panels/information/informationpanelcontent.cpp
M  +8    -0    src/panels/information/informationpanelcontent.h
M  +17   -2    src/panels/information/pixmapviewer.cpp
M  +3    -0    src/panels/information/pixmapviewer.h
M  +13   -0    src/tests/CMakeLists.txt
A  +90   -0    src/tests/informationpanelcontenttest.cpp     [License:
GPL(v2.0+)]
A  +81   -0    src/tests/pixmapviewertest.cpp     [License: GPL(v2.0+)]

https://invent.kde.org/system/dolphin/-/commit/ff51c83685c3058d8fd501196e090370a5a46f50

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to