Add a method to render round box with a dark edge and use it for alt-tab's frame.

Now the frame has a slight edge/border around it which makes it look much better IMHO.

svn path=/trunk/KDE/kdebase/workspace/; revision=704310
This commit is contained in:
Rivo Laks 2007-08-24 15:44:52 +00:00
parent 00a10f732b
commit cc2600100c
4 changed files with 13 additions and 0 deletions

View file

@ -95,6 +95,7 @@ if(OPENGL_FOUND)
data/lookingglass.vert
data/shadow-texture.png
data/circle.png
data/circle-edgy.png
DESTINATION ${DATA_INSTALL_DIR}/kwin )
# config modules

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -320,6 +320,17 @@ void renderRoundBox( const QRect& area, float roundness, GLTexture* texture )
glPopAttrib();
}
void renderRoundBoxWithEdge( const QRect& area, float roundness )
{
static GLTexture* texture = 0;
if( !texture )
{
QString texturefile = KGlobal::dirs()->findResource("data", "kwin/circle-edgy.png");
texture = new GLTexture(texturefile);
}
renderRoundBox( area, roundness, texture );
}
//****************************************
// GLTexture
//****************************************

View file

@ -92,6 +92,7 @@ KWIN_EXPORT void renderGLGeometryImmediate( int count,
KWIN_EXPORT void renderRoundBox( const QRect& area, float roundness = 10.0f, GLTexture* texture = 0 );
KWIN_EXPORT void renderRoundBoxWithEdge( const QRect& area, float roundness = 10.0f );
class KWIN_EXPORT GLTexture