[KStandardItemListWidget] Pass icon state to overlay painter
ClosedPublic

Authored by broulik on Oct 19 2018, 5:52 AM.

Details

Summary

Ensures the overlay is painted in the same icon state, especially the selected one so dark overlays turn white.

Test Plan

Before


After

No change for icon view as there (currently) is no highlight behind it
No change for when file has a preview as there you could end up with a white emblem on a white image

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Oct 19 2018, 5:52 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptOct 19 2018, 5:52 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
broulik requested review of this revision.Oct 19 2018, 5:52 AM
broulik edited the test plan for this revision. (Show Details)
elvisangelaccio accepted this revision.Oct 19 2018, 2:24 PM
This revision is now accepted and ready to land.Oct 19 2018, 2:24 PM

No change for when file has a preview as there you could end up with a white emblem on a white image

Not sure this is semantically correct. The fact that some emblems are white with no border is an implementation detail that Dolphin shouldn't have to care about. And we're fixing it soon anyway: https://bugs.kde.org/show_bug.cgi?id=399357

Not sure this is semantically correct. The fact that some emblems are white with no border is an implementation detail that Dolphin shouldn't have to care about.

I agree, it's a separate issue, though, as I would have expected this codepath to also affect files with thumbnails but it does not, the overlays for thumbnails are painted in KFileItemModelRolesUpdater::slotGotPreview instead which doesn't have any notion of selected/hovered.

ngraham accepted this revision.Oct 20 2018, 11:33 PM

Cool, let's do it then.

This revision was automatically updated to reflect the committed changes.