Use the opacity of the window that a taskbar thumbnail is displayed on
when displaying the thumbnail. This allows thumbnails to fade in and out with the Plasma tooltip for example instead of always being opaque. svn path=/trunk/KDE/kdebase/workspace/; revision=920573icc-effect-5.14.5
parent
d12b115dbe
commit
6763fd5728
|
@ -67,18 +67,22 @@ void TaskbarThumbnailEffect::paintWindow( EffectWindow* w, int mask, QRegion reg
|
||||||
effects->paintWindow( w, mask, region, data ); // paint window first
|
effects->paintWindow( w, mask, region, data ); // paint window first
|
||||||
if( thumbnails.contains( w ))
|
if( thumbnails.contains( w ))
|
||||||
{ // paint thumbnails on it
|
{ // paint thumbnails on it
|
||||||
|
int mask = PAINT_WINDOW_TRANSFORMED;
|
||||||
|
if( data.opacity == 1.0 )
|
||||||
|
mask |= PAINT_WINDOW_OPAQUE;
|
||||||
|
else
|
||||||
|
mask |= PAINT_WINDOW_TRANSLUCENT;
|
||||||
foreach( const Data &thumb, thumbnails.values( w ))
|
foreach( const Data &thumb, thumbnails.values( w ))
|
||||||
{
|
{
|
||||||
EffectWindow* thumbw = effects->findWindow( thumb.window );
|
EffectWindow* thumbw = effects->findWindow( thumb.window );
|
||||||
if( thumbw == NULL )
|
if( thumbw == NULL )
|
||||||
continue;
|
continue;
|
||||||
WindowPaintData data( thumbw );
|
WindowPaintData thumbData( thumbw );
|
||||||
|
thumbData.opacity = data.opacity;
|
||||||
QRect r;
|
QRect r;
|
||||||
setPositionTransformations( data, r,
|
setPositionTransformations( thumbData, r,
|
||||||
thumbw, thumb.rect.translated( w->pos()), Qt::KeepAspectRatio );
|
thumbw, thumb.rect.translated( w->pos()), Qt::KeepAspectRatio );
|
||||||
effects->drawWindow( thumbw,
|
effects->drawWindow( thumbw, mask, r, thumbData );
|
||||||
PAINT_WINDOW_OPAQUE | PAINT_WINDOW_TRANSFORMED,
|
|
||||||
r, data );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,4 +116,5 @@ X-KDE-PluginInfo-Category=Appearance
|
||||||
X-KDE-PluginInfo-Depends=
|
X-KDE-PluginInfo-Depends=
|
||||||
X-KDE-PluginInfo-License=GPL
|
X-KDE-PluginInfo-License=GPL
|
||||||
X-KDE-PluginInfo-EnabledByDefault=true
|
X-KDE-PluginInfo-EnabledByDefault=true
|
||||||
|
X-KDE-Ordering=70
|
||||||
X-KDE-Library=kwin4_effect_builtins
|
X-KDE-Library=kwin4_effect_builtins
|
||||||
|
|
Loading…
Reference in New Issue