Bug 256465

Summary: Wrong icon loaded in "mouse down" event
Product: [Unmaintained] plasma4 Reporter: markuss <kamikazow>
Component: widget-folderviewAssignee: Ignat Semenov <i.semenov.kde>
Status: RESOLVED FIXED    
Severity: normal CC: andresbajotierra, i.semenov.kde, thijs22nospam
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.4
Sentry Crash Report:
Attachments: Screenshot

Description markuss 2010-11-09 20:19:09 UTC
Version:           unspecified (using KDE 4.5.3) 
OS:                Linux

With the recent mimetype icon changes I found a weird behavior in the Folder View plasmoid.

When you select a file and hold down the mouse button, the 256x256 icon version is always loaded in a scaled-down version while the rest of Folder View loads the icons in the correct size (in my case 48x48).

Reproducible: Always

Steps to Reproduce:
Select a file, hold down the mouse button

Actual Results:  
A totally different icon than the usual one.

Expected Results:  
Folder View should use the icon file size selected in its preferences and scale it down by a view pixels to get the same result with correct icons.
Comment 1 markuss 2010-11-10 12:07:30 UTC
Created attachment 53295 [details]
Screenshot
Comment 2 Dario Andres 2010-12-10 21:21:06 UTC
[Comment from a bug triager]
I can reproduce this with KDE SC 4.6beta2 on ArchLinux 686
Comment 3 Thijs 2012-01-17 08:52:06 UTC
..And confirmed on 4.7.4, too
Comment 4 Ignat Semenov 2012-03-03 13:03:32 UTC
Aaawesome! Now this is another confirmation of the dreaded iconloader bug. Thank you for reporting!
Comment 5 Ignat Semenov 2012-05-12 13:39:00 UTC
commit f1ea9f65eaabf3e5e8a6076df580818effcaf7aa
Author: Michael Pyne <mpyne@kde.org>
Date:   Thu May 10 21:59:38 2012 -0400

    Do not force the largest-available icon size to be used.
    
    The current icon-selection code "locks-in" the largest size icon already
    found that is otherwise suitable. This is undesirable since downscaling
    the icon which is the next step up in size should generally be quicker
    and give a more size-appropriate representation on-screen.
    
    Instead of skipping icons that are smaller than an icon already found
    (even if they are a better "fit" for the desired size), we use a simpler
    test to skip icons that require upscaling when we've already found an
    icon that can be downscaled. Otherwise we prefer icons that are closer
    to the desired size.
    
    Issue noted and debugged by Ignat Semenov.
    
    CCMAIL:ragnarokk91@gmail.com