Moved hover and focus brush from Oxygen::StyleHelper to OxygenHelper so that they can be used in in the decoration, for

optimization. 

Added "NegativeText" brush, to optimize rendering of close buttons. 

Renamed OxygenHelper to Oxygen::Helper for consistency with the other classes. (needs full update of workspace/libs/oxygen, 
kstyles/oxygen and kwin/clients/oxygen, but this is already true for the above ...)


svn path=/trunk/KDE/kdebase/workspace/; revision=1125082
This commit is contained in:
Hugo Pereira Da Costa 2010-05-10 16:36:56 +00:00
parent aff64607bf
commit 97371a74c2
3 changed files with 6 additions and 6 deletions

View file

@ -218,8 +218,8 @@ namespace Oxygen
buttonDetailColor( palette ); buttonDetailColor( palette );
QColor glow = (type_ == ButtonClose || type_ == ButtonItemClose ) ? QColor glow = (type_ == ButtonClose || type_ == ButtonItemClose ) ?
KColorScheme(palette.currentColorGroup()).foreground(KColorScheme::NegativeText).color(): helper_.viewNegativeTextBrush().brush(palette).color():
KColorScheme(palette.currentColorGroup()).decoration(KColorScheme::HoverColor).color(); helper_.viewHoverBrush().brush(palette).color();
glow = helper_.calcDarkColor( glow ); glow = helper_.calcDarkColor( glow );
if( isAnimated() ) color = KColorUtils::mix( color, glow, glowIntensity() ); if( isAnimated() ) color = KColorUtils::mix( color, glow, glowIntensity() );
@ -331,7 +331,7 @@ namespace Oxygen
case ButtonAbove: case ButtonAbove:
if(isChecked()) { if(isChecked()) {
QPen newPen = painter->pen(); QPen newPen = painter->pen();
newPen.setColor(KColorScheme(palette.currentColorGroup()).decoration(KColorScheme::HoverColor).color()); newPen.setColor(helper_.viewHoverBrush().brush(palette).color());
painter->setPen(newPen); painter->setPen(newPen);
} }
@ -344,7 +344,7 @@ namespace Oxygen
case ButtonBelow: case ButtonBelow:
if(isChecked()) { if(isChecked()) {
QPen newPen = painter->pen(); QPen newPen = painter->pen();
newPen.setColor(KColorScheme(palette.currentColorGroup()).decoration(KColorScheme::HoverColor).color()); newPen.setColor(helper_.viewHoverBrush().brush( palette ).color() );
painter->setPen(newPen); painter->setPen(newPen);
} }

View file

@ -26,7 +26,7 @@ namespace Oxygen
{ {
//______________________________________________________________________________ //______________________________________________________________________________
DecoHelper::DecoHelper(const QByteArray &componentName): DecoHelper::DecoHelper(const QByteArray &componentName):
OxygenHelper(componentName) Helper(componentName)
{} {}
//______________________________________________________________________________ //______________________________________________________________________________

View file

@ -27,7 +27,7 @@
/*! contains utility functions used at multiple places in oxygen style */ /*! contains utility functions used at multiple places in oxygen style */
namespace Oxygen namespace Oxygen
{ {
class DecoHelper : public OxygenHelper class DecoHelper : public Helper
{ {
public: public: