mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
* Make the hover fade a bit more noticeable. Looks nice imo.
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
static const int FADE_DURATION = 75;
|
static const int FADE_DURATION = 250;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -125,10 +125,8 @@ AlbumItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
|||||||
fader->setSize( r.size() );
|
fader->setSize( r.size() );
|
||||||
|
|
||||||
const QPixmap cover = fader->currentPixmap();
|
const QPixmap cover = fader->currentPixmap();
|
||||||
|
|
||||||
painter->drawPixmap( r, cover );
|
painter->drawPixmap( r, cover );
|
||||||
|
|
||||||
|
|
||||||
qreal opacity = -1.;
|
qreal opacity = -1.;
|
||||||
if ( m_hoverFaders.contains( index ) )
|
if ( m_hoverFaders.contains( index ) )
|
||||||
{
|
{
|
||||||
@@ -140,7 +138,6 @@ AlbumItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
|||||||
opacity = 0.35;
|
opacity = 0.35;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ( opacity > -1. )
|
if ( opacity > -1. )
|
||||||
{
|
{
|
||||||
painter->save();
|
painter->save();
|
||||||
|
Reference in New Issue
Block a user