Changeset View
Changeset View
Standalone View
Standalone View
kstyle/breezestyle.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 3843 Lines • ▼ Show 20 Line(s) | 3824 | { | |||
---|---|---|---|---|---|
3844 | _animations->widgetStateEngine().updateState( widget, AnimationPressed, checkBoxState != CheckOff ); | 3844 | _animations->widgetStateEngine().updateState( widget, AnimationPressed, checkBoxState != CheckOff ); | ||
3845 | if( _animations->widgetStateEngine().isAnimated( widget, AnimationPressed ) ) checkBoxState = CheckAnimated; | 3845 | if( _animations->widgetStateEngine().isAnimated( widget, AnimationPressed ) ) checkBoxState = CheckAnimated; | ||
3846 | const qreal animation( _animations->widgetStateEngine().opacity( widget, AnimationPressed ) ); | 3846 | const qreal animation( _animations->widgetStateEngine().opacity( widget, AnimationPressed ) ); | ||
3847 | 3847 | | |||
3848 | // colors | 3848 | // colors | ||
3849 | const auto shadow( _helper->shadowColor( palette ) ); | 3849 | const auto shadow( _helper->shadowColor( palette ) ); | ||
3850 | const AnimationMode mode( _animations->widgetStateEngine().isAnimated( widget, AnimationHover ) ? AnimationHover:AnimationNone ); | 3850 | const AnimationMode mode( _animations->widgetStateEngine().isAnimated( widget, AnimationHover ) ? AnimationHover:AnimationNone ); | ||
3851 | const qreal opacity( _animations->widgetStateEngine().opacity( widget, AnimationHover ) ); | 3851 | const qreal opacity( _animations->widgetStateEngine().opacity( widget, AnimationHover ) ); | ||
3852 | QColor background = itemViewParent( widget ) ? palette.color( QPalette::Base ) : palette.color( QPalette::Window ); | ||||
3852 | QColor color = _helper->checkBoxIndicatorColor( palette, mouseOver, enabled && active, opacity, mode ); | 3853 | QColor color = _helper->checkBoxIndicatorColor( palette, mouseOver, enabled && active, opacity, mode ); | ||
3853 | 3854 | | |||
3854 | // render | 3855 | // render | ||
3855 | _helper->renderCheckBoxBackground( painter, rect, palette.color( QPalette::Base ), sunken ); | 3856 | _helper->renderCheckBoxBackground( painter, rect, background, sunken ); | ||
3856 | _helper->renderCheckBox( painter, rect, color, shadow, sunken, checkBoxState, animation ); | 3857 | _helper->renderCheckBox( painter, rect, color, shadow, sunken, checkBoxState, animation ); | ||
3857 | return true; | 3858 | return true; | ||
3858 | 3859 | | |||
3859 | } | 3860 | } | ||
3860 | 3861 | | |||
3861 | //___________________________________________________________________________________ | 3862 | //___________________________________________________________________________________ | ||
3862 | bool Style::drawIndicatorRadioButtonPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const | 3863 | bool Style::drawIndicatorRadioButtonPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const | ||
3863 | { | 3864 | { | ||
Show All 17 Lines | |||||
3881 | _animations->widgetStateEngine().updateState( widget, AnimationPressed, radioButtonState != RadioOff ); | 3882 | _animations->widgetStateEngine().updateState( widget, AnimationPressed, radioButtonState != RadioOff ); | ||
3882 | if( _animations->widgetStateEngine().isAnimated( widget, AnimationPressed ) ) radioButtonState = RadioAnimated; | 3883 | if( _animations->widgetStateEngine().isAnimated( widget, AnimationPressed ) ) radioButtonState = RadioAnimated; | ||
3883 | const qreal animation( _animations->widgetStateEngine().opacity( widget, AnimationPressed ) ); | 3884 | const qreal animation( _animations->widgetStateEngine().opacity( widget, AnimationPressed ) ); | ||
3884 | 3885 | | |||
3885 | // colors | 3886 | // colors | ||
3886 | const auto shadow( _helper->shadowColor( palette ) ); | 3887 | const auto shadow( _helper->shadowColor( palette ) ); | ||
3887 | const AnimationMode mode( _animations->widgetStateEngine().isAnimated( widget, AnimationHover ) ? AnimationHover:AnimationNone ); | 3888 | const AnimationMode mode( _animations->widgetStateEngine().isAnimated( widget, AnimationHover ) ? AnimationHover:AnimationNone ); | ||
3888 | const qreal opacity( _animations->widgetStateEngine().opacity( widget, AnimationHover ) ); | 3889 | const qreal opacity( _animations->widgetStateEngine().opacity( widget, AnimationHover ) ); | ||
3890 | QColor background = itemViewParent( widget ) ? palette.color( QPalette::Base ) : palette.color( QPalette::Window ); | ||||
3889 | QColor color = _helper->checkBoxIndicatorColor( palette, mouseOver, enabled && checked, opacity, mode ); | 3891 | QColor color = _helper->checkBoxIndicatorColor( palette, mouseOver, enabled && checked, opacity, mode ); | ||
3890 | 3892 | | |||
3891 | // render | 3893 | // render | ||
3892 | _helper->renderRadioButtonBackground( painter, rect, palette.color( QPalette::Base ), sunken ); | 3894 | _helper->renderRadioButtonBackground( painter, rect, background, sunken ); | ||
3893 | _helper->renderRadioButton( painter, rect, color, shadow, sunken, radioButtonState, animation ); | 3895 | _helper->renderRadioButton( painter, rect, color, shadow, sunken, radioButtonState, animation ); | ||
3894 | 3896 | | |||
3895 | return true; | 3897 | return true; | ||
3896 | 3898 | | |||
3897 | } | 3899 | } | ||
3898 | 3900 | | |||
3899 | //___________________________________________________________________________________ | 3901 | //___________________________________________________________________________________ | ||
3900 | bool Style::drawIndicatorButtonDropDownPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const | 3902 | bool Style::drawIndicatorButtonDropDownPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const | ||
▲ Show 20 Lines • Show All 3345 Lines • Show Last 20 Lines |