Added support for changing background colour of LineEdit widget when focus changes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14385 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -75,11 +75,9 @@ void PushButton::createGraphicsImplementation()
|
||||
|
||||
Style* style = (getStyle()!=0) ? getStyle() : Style::instance().get();
|
||||
|
||||
_buttonSwitch = new osg::Switch;
|
||||
|
||||
float unFocused = 0.92;
|
||||
float withFocus = 0.97;
|
||||
float pressed = 0.75;
|
||||
|
||||
osg::Vec4 frameColor(unFocused,unFocused,unFocused,1.0f);
|
||||
|
||||
@@ -95,9 +93,9 @@ void PushButton::createGraphicsImplementation()
|
||||
extents.yMax() -= getFrameSettings()->getLineWidth();
|
||||
}
|
||||
|
||||
_buttonSwitch = new osg::Switch;
|
||||
_buttonSwitch->addChild(style->createPanel(extents, osg::Vec4(unFocused, unFocused,unFocused, 1.0)));
|
||||
_buttonSwitch->addChild(style->createPanel(extents, osg::Vec4(withFocus,withFocus,withFocus,1.0)));
|
||||
_buttonSwitch->addChild(style->createPanel(extents, osg::Vec4(pressed,pressed,pressed,1.0)));
|
||||
_buttonSwitch->setSingleChildOn(0);
|
||||
|
||||
group->addChild(_buttonSwitch.get());
|
||||
|
||||
Reference in New Issue
Block a user