- // The image can be blank, the color can be used regardless.
- option.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, mPressedImage );
- option.SetProperty( Toolkit::Button::Property::SELECTED_COLOR, mPressedColor );
+ Property::Value selectedBackgroundValue( mPressedImage );
+ if( mPressedImage.empty() )
+ {
+ // The image can be blank, the color can be used in that case.
+ selectedBackgroundValue = Property::Value{ { Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR },
+ { Toolkit::ColorVisual::Property::MIX_COLOR, mPressedColor } };
+ }
+ option.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, selectedBackgroundValue );