Temporary fix issue with toolbar black background on mac with OpenGL render.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-03-12 12:25:02 +02:00
parent a68da11776
commit 20840667bb

View file

@ -35,6 +35,11 @@
#include <QToolBar>
#include <QFileDialog>
#if defined(Q_OS_MAC)
#include "../vwidgets/vmaingraphicsview.h"
#include <QStyleFactory>
#endif
VAbstractMainWindow::VAbstractMainWindow(QWidget *parent)
: QMainWindow(parent),
m_curFileFormatVersion(0x0),
@ -84,6 +89,14 @@ void VAbstractMainWindow::ToolBarStyle(QToolBar *bar)
{
bar->setToolButtonStyle(Qt::ToolButtonIconOnly);
}
#if defined(Q_OS_MAC)
// Temporary fix issue with toolbar black background on mac with OpenGL render
if (qApp->getSceneView() && qApp->getSceneView()->IsOpenGLRender())
{
bar->setStyle(QStyleFactory::create("fusion"));
}
#endif
}
//---------------------------------------------------------------------------------------------------------------------