Fixed some coding style.

Changed tileset definition so that all shadow pixmaps have same size.

svn path=/trunk/KDE/kdebase/workspace/; revision=1217933
This commit is contained in:
Hugo Pereira Da Costa 2011-01-29 18:10:00 +00:00
parent 5a41506500
commit 025e7a5859
2 changed files with 8 additions and 10 deletions

View file

@ -25,7 +25,6 @@
//////////////////////////////////////////////////////////////////////////////
#include "oxygenshadowcache.h"
#include "oxygenhelper.h"
#include <cassert>
#include <cmath>
@ -70,13 +69,13 @@ namespace Oxygen
TileSet* ShadowCache::tileSet( const Key& key )
{
// check if tileset already in cache
// check if tileSet already in cache
int hash( key.hash() );
if( enabled_ && shadowCache_.contains(hash) ) return shadowCache_.object(hash);
// create tileset otherwise
// create tileSet otherwise
qreal size( shadowSize() );
TileSet* tileSet = new TileSet( shadowPixmap( key, key.active ), size, size, 1, 1);
TileSet* tileSet = new TileSet( shadowPixmap( key, key.active ), size, size, size, size, size, size, 1, 1);
shadowCache_.insert( hash, tileSet );
return tileSet;
@ -93,7 +92,7 @@ namespace Oxygen
// construct key
key.index = index;
// check if tileset already in cache
// check if tileSet already in cache
int hash( key.hash() );
if( enabled_ && animatedShadowCache_.contains(hash) ) return animatedShadowCache_.object(hash);

View file

@ -27,14 +27,13 @@
// IN THE SOFTWARE.
//////////////////////////////////////////////////////////////////////////////
#include "oxygendecohelper.h"
#include "oxygenshadowconfiguration.h"
#include "oxygendecohelper.h"
#include <cmath>
#include <QtCore/QCache>
#include <QtGui/QRadialGradient>
namespace Oxygen
{
@ -43,7 +42,7 @@ namespace Oxygen
public:
//! constructor
ShadowCache( DecoHelper& helper );
ShadowCache( DecoHelper& );
//! destructor
virtual ~ShadowCache( void )
@ -240,12 +239,12 @@ namespace Oxygen
};
private:
//! draw gradient into rect
/*! a separate method is used in order to properly account for corners */
void renderGradient( QPainter&, const QRectF&, const QRadialGradient&, bool hasBorder = true ) const;
private:
//! helper
DecoHelper& helper_;