mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 23:26:40 +02:00
Fix headless
This commit is contained in:
@@ -300,19 +300,6 @@ extensionToMimetype( const QString& extension )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QColor
|
|
||||||
alphaBlend( const QColor& colorFrom, const QColor& colorTo, float opacity )
|
|
||||||
{
|
|
||||||
opacity = qMax( (float)0.3, opacity );
|
|
||||||
int r = colorFrom.red(), g = colorFrom.green(), b = colorFrom.blue();
|
|
||||||
r = opacity * r + ( 1 - opacity ) * colorTo.red();
|
|
||||||
g = opacity * g + ( 1 - opacity ) * colorTo.green();
|
|
||||||
b = opacity * b + ( 1 - opacity ) * colorTo.blue();
|
|
||||||
|
|
||||||
return QColor( r, g, b );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NetworkProxyFactory::NetworkProxyFactory( const NetworkProxyFactory& other )
|
NetworkProxyFactory::NetworkProxyFactory( const NetworkProxyFactory& other )
|
||||||
{
|
{
|
||||||
m_noProxyHosts = QStringList( other.m_noProxyHosts );
|
m_noProxyHosts = QStringList( other.m_noProxyHosts );
|
||||||
|
@@ -291,4 +291,16 @@ setHeaderHeight( int height )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QColor
|
||||||
|
alphaBlend( const QColor& colorFrom, const QColor& colorTo, float opacity )
|
||||||
|
{
|
||||||
|
opacity = qMax( (float)0.3, opacity );
|
||||||
|
int r = colorFrom.red(), g = colorFrom.green(), b = colorFrom.blue();
|
||||||
|
r = opacity * r + ( 1 - opacity ) * colorTo.red();
|
||||||
|
g = opacity * g + ( 1 - opacity ) * colorTo.green();
|
||||||
|
b = opacity * b + ( 1 - opacity ) * colorTo.blue();
|
||||||
|
|
||||||
|
return QColor( r, g, b );
|
||||||
|
}
|
||||||
|
|
||||||
} // ns
|
} // ns
|
||||||
|
Reference in New Issue
Block a user