moved CheckBoxState enumeration to breeze.h

wilder-pre-rebase
Hugo Pereira Da Costa 12 years ago
parent 95b2f83273
commit 8b951d0131
  1. 8
      kstyle/breeze.h
  2. 9
      kstyle/breezehelper.h
  3. 8
      kstyle/breezestyle.cpp

@ -169,6 +169,14 @@ namespace Breeze
Q_DECLARE_FLAGS( Corners, Corner );
//! checkbox state (used for checkboxes _and_ radio buttons)
enum CheckBoxState
{
CheckOff,
CheckPartial,
CheckOn
};
//! arrow orientation
enum ArrowOrientation
{

@ -146,14 +146,6 @@ namespace Breeze
//! separator
void renderSeparator( QPainter*, const QRect&, const QColor&, bool vertical = false ) const;
//! checkbox state (used for checkboxes _and_ radio buttons)
enum CheckBoxState
{
CheckOff = 0,
CheckPartial = 1,
CheckOn = 2
};
//! checkbox
void renderCheckBox( QPainter*, const QRect&, const QColor& color, const QColor& shadow, bool sunken, CheckBoxState state ) const;
@ -196,7 +188,6 @@ namespace Breeze
//! tabbar tab
void renderTabBarTab( QPainter*, const QRect&, const QColor& color, const QColor& outline, Corners ) const;
//! generic arrow
void renderArrow( QPainter*, const QRect&, const QColor&, ArrowOrientation ) const;

@ -2905,9 +2905,9 @@ namespace Breeze
const bool active( ( state & (State_On|State_NoChange) ) );
// checkbox state
Helper::CheckBoxState checkBoxState( Helper::CheckOff );
if( state & State_NoChange ) checkBoxState = Helper::CheckPartial;
else if( state & State_On ) checkBoxState = Helper::CheckOn;
CheckBoxState checkBoxState( CheckOff );
if( state & State_NoChange ) checkBoxState = CheckPartial;
else if( state & State_On ) checkBoxState = CheckOn;
// animation state
_animations->widgetStateEngine().updateState( widget, AnimationHover, mouseOver );
@ -3487,7 +3487,7 @@ namespace Breeze
checkBoxRect = handleRTL( option, checkBoxRect );
// checkbox state
Helper::CheckBoxState state( menuItemOption->checked ? Helper::CheckOn : Helper::CheckOff );
CheckBoxState state( menuItemOption->checked ? CheckOn : CheckOff );
const bool active( menuItemOption->checked );
const QColor color( _helper->checkBoxIndicatorColor( palette, enabled && selected, enabled && active ) );
const QColor shadow( _helper->shadowColor( palette ) );

Loading…
Cancel
Save