From 3ae169fba9dade8ae56a7540234b8ba79c0565c6 Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Wed, 4 Jul 2007 20:34:39 +0000 Subject: [PATCH] Make boxswitch less boxy by using some rounded corners svn path=/trunk/KDE/kdebase/workspace/; revision=683517 --- effects/boxswitch.cpp | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/effects/boxswitch.cpp b/effects/boxswitch.cpp index 4082af89ca..fc4a85232b 100644 --- a/effects/boxswitch.cpp +++ b/effects/boxswitch.cpp @@ -425,18 +425,9 @@ void BoxSwitchEffect::paintFrame() #ifdef HAVE_OPENGL if( effects->compositingType() == OpenGLCompositing ) { - glPushAttrib( GL_CURRENT_BIT | GL_ENABLE_BIT ); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + glPushAttrib( GL_CURRENT_BIT ); glColor4f( 0, 0, 0, alpha ); - const float verts[ 4 * 2 ] = - { - frame_area.x(), frame_area.y(), - frame_area.x(), frame_area.y() + frame_area.height(), - frame_area.x() + frame_area.width(), frame_area.y() + frame_area.height(), - frame_area.x() + frame_area.width(), frame_area.y() - }; - renderGLGeometry( 4, verts ); + renderRoundBox( frame_area ); glPopAttrib(); } #endif @@ -468,18 +459,9 @@ void BoxSwitchEffect::paintHighlight( QRect area, QString text ) #ifdef HAVE_OPENGL if( effects->compositingType() == OpenGLCompositing ) { - glPushAttrib( GL_CURRENT_BIT | GL_ENABLE_BIT ); - glEnable( GL_BLEND ); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + glPushAttrib( GL_CURRENT_BIT ); glColor4f( 1, 1, 1, alpha ); - const float verts[ 4 * 2 ] = - { - area.x(), area.y(), - area.x(), area.y() + area.height(), - area.x() + area.width(), area.y() + area.height(), - area.x() + area.width(), area.y() - }; - renderGLGeometry( 4, verts ); + renderRoundBox( area ); glPopAttrib(); } #endif