]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Keep name readable on drag to matching background
authorChristian Christiansen <christian.l.christiansen@gmail.com>
Tue, 5 May 2020 23:30:57 +0000 (09:30 +1000)
committerChristian Christiansen <christian.l.christiansen@gmail.com>
Tue, 5 May 2020 23:40:55 +0000 (09:40 +1000)
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.

Reviewers: #dolphin, elvisangelaccio, meven

Reviewed By: #dolphin, elvisangelaccio, meven

Subscribers: meven, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29378

src/kitemviews/kitemlistwidget.cpp

index 49a13f68fa096ef549a069d6d30147602f673bb9..42bf9ebdcbb8397cf5feb23a19c766a9b4a36510 100644 (file)
@@ -378,7 +378,6 @@ QPixmap KItemListWidget::createDragPixmap(const QStyleOptionGraphicsItem* option
     const bool wasHovered = m_hovered;
 
     setAlternateBackground(false);
-    setSelected(false);
     setHovered(false);
 
     paint(&painter, option, widget);