Style sheet now applied to PdmUiTreeViewEditor.

Move some classes from PdmUiTreeViewEditor.cpp to the header file in order to make them available in RiuGuiTheme to adjust the style of tree views and keep the drag&drop styling. 
Removed getStyleSheet function.
This commit is contained in:
Ruben Thoms
2020-09-29 17:57:02 +02:00
committed by Magne Sjaastad
parent a68598fd16
commit 0f92ad13ad
12 changed files with 170 additions and 141 deletions

View File

@@ -22,7 +22,9 @@
#include "RiaGuiApplication.h"
#include "RiaPreferences.h"
#include "RiuThemesDirectory.h"
#include "cafAppEnum.h"
#include "cafPdmUiTreeViewEditor.h"
#include <QAbstractItemModel>
#include <QColor>
@@ -362,6 +364,10 @@ void RiuGuiTheme::updateGuiTheme( RiaDefines::ThemeEnum theme )
{
widget->style()->unpolish( widget );
widget->style()->polish( widget );
if ( caf::PdmUiTreeViewWidget* treeViewWidget = dynamic_cast<caf::PdmUiTreeViewWidget*>( widget ) )
{
treeViewWidget->setStyle( new caf::PdmUiTreeViewStyle );
}
}
}