Option to disable frames with shadows on selected directories
Changes PlannedPublic

Authored by andrebarros on Apr 13 2017, 2:41 AM.


Group Reviewers

Add an option to disable frames with shadows on directories the user chooses to.

FEATURE: 378701
FIXED-IN: 18.12.0

Test Plan

I've been patching dolphin for a long time to remove the shadow it puts around icons on some directories. Never submitted it because it is still not 100% functional, it fails to immediately refresh the "view" mode and I need to change to some other directory and go back to have it honored. Anyway, it is useful and may be easily corrected by someone more familiarized with the code tree. Also, it does not introduce bugs (at least, I did not see any) and respect user options for each directory affected.

If it is refused, I would appreciate just the correction to the fault behavior (i.e., the refresh issue).

Diff Detail

R318 Dolphin
Lint Skipped
Unit Tests Skipped
andrebarros created this revision.Apr 13 2017, 2:41 AM
elvisangelaccio requested changes to this revision.Apr 13 2017, 1:48 PM

Note that the frame around previews has been deprecated and removed almost everywhere: from kio-extras since 16.12.3, from ffmpegthumbs since the upcoming 17.04. Upgrading both and purging the thumbnail cache should fix everything without patching Dolphin ;)

This revision now requires changes to proceed.Apr 13 2017, 1:48 PM
andrebarros planned changes to this revision.Apr 13 2017, 2:33 PM

The problem is, Dolphin does it explicitly, see

kfileitemmodelrolesupdater.cpp, line 550 (patched code), line 515 (original code)

May I help, let me know.

Oh I see, I thought you were referring to the thumbnail's frames, my bad.

Please note that your patch doesn't apply, there is no "dolphin-patched" folder in the repository.

Use "patch -p1 < [patch-file]" or "cat [patch-file] | patch -p1" inside dolphin tree.

What might make more sense for this patch is to disable frames and shadows for only SVG images and raster images with an alpha channel (i.e. images most likely to be icons, where the frame and shadow would look bad).

@andrebarros any movement here?

Restricted Application added a subscriber: kfm-devel. · View Herald TranscriptAug 22 2018, 5:30 PM

As I said, I have been adjusting the patch for a couple of years now to fit my use. I will polish it this weekend and resubmit.
It is really useful for some of us that work with web development as it allows a clear visualization of the elements to be inserted on pages without the distracting frames.

ngraham edited the summary of this revision. (Show Details)Aug 25 2018, 2:20 AM

FWIW, I've submitted a set of patches that refine the frame drawing behavior: D15071 and D15069. With those, frames will no longer be drawn for thumbnails that have any transparency or that are very small. Basically the only things that would still have frames would be rectilinear images that are 100% opaque (e.g. photographs).

Would that satisfy your need, or would you still want the user-selectable ability to turn off frames for non-transparent rectangular images?

That is fine with me.

I think that the original motivation for it was to have a kind of drop shadow effect on icons/images but it was always shortsighted in my opinion as it did not compute the real edges of images (in which case it should also take out the inner holes). It would be computing intensive if it was used this way and still would have to have a disable option on my opinion.

Best regards,André