From 256db17f7b551874828828d7e8276624a6656798 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Tue, 12 Aug 2014 09:14:06 +0200 Subject: [PATCH] made alphaColor non static changed (back) 'int' radius to 3 adjusted helper's 'qreal' radius accordingly (to 2.5), and fixed shadow radius --- kstyle/breeze.h | 2 +- kstyle/breezehelper.cpp | 7 ++++--- kstyle/breezehelper.h | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/kstyle/breeze.h b/kstyle/breeze.h index 78e1fb8a..8f37f042 100644 --- a/kstyle/breeze.h +++ b/kstyle/breeze.h @@ -39,7 +39,7 @@ namespace Breeze // frames Frame_FrameWidth = 2, - Frame_FrameRadius = 2, + Frame_FrameRadius = 3, // layout Layout_TopLevelMarginWidth = 10, diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp index 84cc0a39..f635114a 100644 --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -23,6 +23,7 @@ #include "breezehelper.h" #include "breeze.h" +#include "breezestyleconfigdata.h" #include #include @@ -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 ); diff --git a/kstyle/breezehelper.h b/kstyle/breezehelper.h index fc8345e1..89d00801 100644 --- a/kstyle/breezehelper.h +++ b/kstyle/breezehelper.h @@ -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