Commit 6741f01b authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Bin icon view: make audio /video drag icons more visible on hover

parent e7915cb3
......@@ -444,10 +444,13 @@ public:
int cType = index.data(AbstractProjectItem::ClipType).toInt();
bool hasAudioAndVideo = index.data(AbstractProjectItem::ClipHasAudioAndVideo).toBool();
if (hasAudioAndVideo && (cType == ClipType::AV || cType == ClipType::Playlist) && (opt.state & QStyle::State_MouseOver)) {
QRect thumbRect = m_thumbRect;
QRect thumbRect = m_thumbRect.adjusted(0, 0, 0, 2);
int iconSize = painter->boundingRect(thumbRect, Qt::AlignLeft, QStringLiteral("O")).height();
thumbRect.setLeft(opt.rect.right() - iconSize - 4);
thumbRect.setWidth(iconSize);
QColor bgColor = option.palette.window().color();
bgColor.setAlphaF(.7);
painter->fillRect(thumbRect, bgColor);
thumbRect.setBottom(m_thumbRect.top() + iconSize);
QIcon aDrag = QIcon::fromTheme(QStringLiteral("audio-volume-medium"));
m_audioDragRect = thumbRect;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment