diff --git a/src/lib/tabwidget/tabicon.cpp b/src/lib/tabwidget/tabicon.cpp index 62f3eaf7e..cf381b04a 100644 --- a/src/lib/tabwidget/tabicon.cpp +++ b/src/lib/tabwidget/tabicon.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2014-2016 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2014-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -175,13 +175,18 @@ void TabIcon::paintEvent(QPaintEvent* event) if (m_animationRunning) { p.drawPixmap(r, s_data->animationPixmap, QRect(m_currentFrame * pixmapSize, 0, pixmapSize, pixmapSize)); - } else if (m_audioIconDisplayed) { + } else if (m_audioIconDisplayed && (!m_tab || !m_tab->isPinned())) { p.drawPixmap(r, m_tab->isMuted() ? s_data->audioMutedPixmap : s_data->audioPlayingPixmap); } else if (!m_sitePixmap.isNull()) { p.drawPixmap(r, m_sitePixmap); } else if (m_tab && m_tab->isPinned()) { p.drawPixmap(r, IconProvider::emptyWebIcon().pixmap(size)); } + + // Draw audio icon on top of site icon for pinned tabs + if (!m_animationRunning && m_audioIconDisplayed && m_tab && m_tab->isPinned()) { + p.drawPixmap(r, m_tab->isMuted() ? s_data->audioMutedPixmap : s_data->audioPlayingPixmap); + } } void TabIcon::mousePressEvent(QMouseEvent *event)