fixed gradient ranges to avoid warning from Qt at runtime
svn path=/trunk/KDE/kdebase/workspace/; revision=1107187
This commit is contained in:
parent
49411bcda5
commit
e3aefe524a
1 changed files with 12 additions and 6 deletions
|
@ -345,10 +345,13 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
QColor c( stops[i].second );
|
QColor c( stops[i].second );
|
||||||
qreal xx( stops[i].first -4.0/rg.radius() );
|
qreal xx( stops[i].first -4.0/rg.radius() );
|
||||||
if( xx<0 && i < stops.size()-1 )
|
if( xx<0 )
|
||||||
|
{
|
||||||
|
if( i < stops.size()-1 )
|
||||||
{
|
{
|
||||||
qreal x1( stops[i+1].first -4.0/rg.radius() );
|
qreal x1( stops[i+1].first -4.0/rg.radius() );
|
||||||
c = KColorUtils::mix( c, stops[i+1].second, -xx/(x1-xx) );
|
c = KColorUtils::mix( c, stops[i+1].second, -xx/(x1-xx) );
|
||||||
|
}
|
||||||
xx = 0;
|
xx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,10 +371,13 @@ namespace Oxygen
|
||||||
{
|
{
|
||||||
QColor c( stops[i].second );
|
QColor c( stops[i].second );
|
||||||
qreal xx( stops[i].first -4.0/rg.radius() );
|
qreal xx( stops[i].first -4.0/rg.radius() );
|
||||||
if( xx<0 && i < stops.size()-1 )
|
if( xx<0 )
|
||||||
|
{
|
||||||
|
if( i < stops.size()-1 )
|
||||||
{
|
{
|
||||||
qreal x1( stops[i+1].first -4.0/rg.radius() );
|
qreal x1( stops[i+1].first -4.0/rg.radius() );
|
||||||
c = KColorUtils::mix( c, stops[i+1].second, -xx/(x1-xx) );
|
c = KColorUtils::mix( c, stops[i+1].second, -xx/(x1-xx) );
|
||||||
|
}
|
||||||
xx = 0;
|
xx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue