Distance between 3D windows is determined by the zoom position divided by the number of windows in stacking order when cube is activated.
svn path=/trunk/KDE/kdebase/workspace/; revision=928279
This commit is contained in:
parent
6a671fa2f2
commit
5025509e3a
2 changed files with 4 additions and 1 deletions
|
@ -86,6 +86,7 @@ CubeEffect::CubeEffect()
|
||||||
, useShaders( false )
|
, useShaders( false )
|
||||||
, cylinderShader( 0 )
|
, cylinderShader( 0 )
|
||||||
, sphereShader( 0 )
|
, sphereShader( 0 )
|
||||||
|
, zOrderingFactor( 0.0f )
|
||||||
, capListCreated( false )
|
, capListCreated( false )
|
||||||
, recompileList( true )
|
, recompileList( true )
|
||||||
, glList( 0 )
|
, glList( 0 )
|
||||||
|
@ -1410,7 +1411,7 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP
|
||||||
// z-Ordering
|
// z-Ordering
|
||||||
if( !w->isDesktop() && !w->isDock() && useZOrdering )
|
if( !w->isDesktop() && !w->isDock() && useZOrdering )
|
||||||
{
|
{
|
||||||
float zOrdering = (effects->stackingOrder().indexOf( w )-1)*25.0;
|
float zOrdering = (effects->stackingOrder().indexOf( w )+1)*zOrderingFactor;
|
||||||
if( start )
|
if( start )
|
||||||
zOrdering *= timeLine.value();
|
zOrdering *= timeLine.value();
|
||||||
if( stop )
|
if( stop )
|
||||||
|
@ -1945,6 +1946,7 @@ void CubeEffect::setActive( bool active )
|
||||||
Qt::OpenHandCursor );
|
Qt::OpenHandCursor );
|
||||||
frontDesktop = effects->currentDesktop();
|
frontDesktop = effects->currentDesktop();
|
||||||
zoom = 0.0;
|
zoom = 0.0;
|
||||||
|
zOrderingFactor = zPosition / ( effects->stackingOrder().count() - 1 );
|
||||||
start = true;
|
start = true;
|
||||||
effects->setActiveFullScreenEffect( this );
|
effects->setActiveFullScreenEffect( this );
|
||||||
kDebug(1212) << "Cube is activated";
|
kDebug(1212) << "Cube is activated";
|
||||||
|
|
|
@ -144,6 +144,7 @@ class CubeEffect
|
||||||
GLShader* sphereShader;
|
GLShader* sphereShader;
|
||||||
float capDeformationFactor;
|
float capDeformationFactor;
|
||||||
bool useZOrdering;
|
bool useZOrdering;
|
||||||
|
float zOrderingFactor;
|
||||||
|
|
||||||
// GL lists
|
// GL lists
|
||||||
bool capListCreated;
|
bool capListCreated;
|
||||||
|
|
Loading…
Reference in a new issue