diff --git a/src/eepp/ui/uiwidget.cpp b/src/eepp/ui/uiwidget.cpp index dbbe96035..e08dd8b7c 100644 --- a/src/eepp/ui/uiwidget.cpp +++ b/src/eepp/ui/uiwidget.cpp @@ -23,7 +23,7 @@ UIWidget::UIWidget( const std::string & tag ) : UINode(), mTag( tag ), mTheme( NULL ), - mStyle( NULL ), + mStyle( UIStyle::New( this ) ), mTooltip( NULL ), mMinControlSize(), mLayoutWeight(0), @@ -37,9 +37,6 @@ UIWidget::UIWidget( const std::string & tag ) : mNodeFlags |= NODE_FLAG_WIDGET; updateAnchorsDistances(); - - if ( getSceneNode()->isUISceneNode() && static_cast( getSceneNode() )->hasStyleSheet() ) - mStyle = UIStyle::New( this ); } UIWidget::UIWidget() :