Keep name readable on drag to matching background
ClosedPublic

Authored by cchristiansen on May 3 2020, 8:26 AM.

Details

Summary

Previously, when a single item was selected and dragged, the
name would become unreadable when the text colour matched the
background colour it was dragged onto.

This is now fixed by not deselecting the item (and hence keeping
the highlighting around the text) before creating the pixmap for
dragging.

BUG: 405266

Test Plan

Tested with Breeze and Breeze Dark.

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.
cchristiansen created this revision.May 3 2020, 8:26 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptMay 3 2020, 8:26 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
cchristiansen requested review of this revision.May 3 2020, 8:26 AM
elvisangelaccio requested changes to this revision.May 3 2020, 5:00 PM
elvisangelaccio added a subscriber: elvisangelaccio.

LGTM besides the inline comment.

src/kitemviews/kitemlistwidget.cpp
385–386

This shouldn't be needed, since we have already painted the drag pixmap and we are going to call again setSelected() at line 388.

This revision now requires changes to proceed.May 3 2020, 5:00 PM

Remove unnecessary code after drag pixmap is already created.

cchristiansen marked an inline comment as done.May 5 2020, 1:11 AM
meven accepted this revision.May 5 2020, 5:44 AM
meven added a subscriber: meven.

LGTM, I have tested it

elvisangelaccio accepted this revision.May 5 2020, 10:02 PM
This revision is now accepted and ready to land.May 5 2020, 10:02 PM
This revision was automatically updated to reflect the committed changes.