made alphaColor non static

changed (back) 'int' radius to 3
adjusted helper's 'qreal' radius accordingly (to 2.5), and fixed shadow radius
wilder-pre-rebase
Hugo Pereira Da Costa 12 years ago
parent fb192baad4
commit 256db17f7b
  1. 2
      kstyle/breeze.h
  2. 7
      kstyle/breezehelper.cpp
  3. 8
      kstyle/breezehelper.h

@ -39,7 +39,7 @@ namespace Breeze
// frames
Frame_FrameWidth = 2,
Frame_FrameRadius = 2,
Frame_FrameRadius = 3,
// layout
Layout_TopLevelMarginWidth = 10,

@ -23,6 +23,7 @@
#include "breezehelper.h"
#include "breeze.h"
#include "breezestyleconfigdata.h"
#include <KColorUtils>
#include <KWindowSystem>
@ -325,7 +326,7 @@ namespace Breeze
}
//____________________________________________________________________
QColor Helper::alphaColor( QColor color, qreal alpha )
QColor Helper::alphaColor( QColor color, qreal alpha ) const
{
if( alpha >= 0 && alpha < 1.0 )
{ color.setAlphaF( alpha*color.alphaF() ); }
@ -452,7 +453,7 @@ namespace Breeze
{
QRectF shadowRect( frameRect.adjusted( 1.5, 1.5, -1.5, -1.5 ).translated( 0, 0.5 ) );
const qreal radius( frameRadius() - 1 );
const qreal radius( frameRadius() );
painter->setPen( QPen( shadow, 2 ) );
painter->setBrush( Qt::NoBrush );
@ -666,7 +667,7 @@ namespace Breeze
if( !sunken )
{
const qreal radius( frameRadius() - 1 );
const qreal radius( frameRadius() );
painter->setPen( QPen( shadow, 2 ) );
painter->setBrush( Qt::NoBrush );

@ -58,12 +58,12 @@ namespace Breeze
//! pointer to shared config
KSharedConfigPtr config() const;
//! add alpha channel multiplier to color
static QColor alphaColor( QColor color, qreal alpha );
//!@name color utilities
//@{
//! add alpha channel multiplier to color
QColor alphaColor( QColor color, qreal alpha ) const;
//! mouse over color
QColor hoverColor( const QPalette& palette ) const
{ return _viewHoverBrush.brush( palette ).color(); }
@ -228,7 +228,7 @@ namespace Breeze
//! frame radius
qreal frameRadius( void ) const
{ return qreal( Metrics::Frame_FrameRadius )+0.5; }
{ return qreal( Metrics::Frame_FrameRadius )-0.5; }
//! return color key for a given color, properly accounting for invalid colors
quint64 colorKey( const QColor& color ) const

Loading…
Cancel
Save