Skip to content

Commit

Permalink
workaround for broken tree indicators with Qt 5.6 under Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed May 20, 2017
1 parent 08b7d91 commit 6bdc3eb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Gui/Application.cpp
Expand Up @@ -1780,6 +1780,23 @@ void Application::runApplication(void)
qApp->sendEvent(&mw, &e);
}
}
#if QT_VERSION == 0x050600 && defined(Q_OS_WIN32)
else {
// Under Windows the tree indicator branch gets corrupted after a while.
// For more details see also https://bugreports.qt.io/browse/QTBUG-52230
// and https://codereview.qt-project.org/#/c/154357/2//ALL,unified
// A workaround for Qt 5.6.0 is to set a minimal style sheet.
QString qss = QString::fromLatin1(
"QTreeView::branch:closed:has-children {\n"
" image: url(:/icons/style/windows_branch_closed.png);\n"
"}\n"
"\n"
"QTreeView::branch:open:has-children {\n"
" image: url(:/icons/style/windows_branch_open.png);\n"
"}\n");
qApp->setStyleSheet(qss);
}
#endif

//initialize spaceball.
mainApp.initSpaceball(&mw);
Expand Down
2 changes: 2 additions & 0 deletions src/Gui/Icons/resource.qrc
Expand Up @@ -40,6 +40,8 @@
<file>ClassBrowser/type_class.svg</file>
<file>ClassBrowser/type_enum.svg</file>
<file>ClassBrowser/type_module.svg</file>
<file>style/windows_branch_closed.png</file>
<file>style/windows_branch_open.png</file>
<file>Std_ViewScreenShot.svg</file>
<file>bound-expression.svg</file>
<file>bound-expression-unset.svg</file>
Expand Down
Binary file added src/Gui/Icons/style/windows_branch_closed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Gui/Icons/style/windows_branch_open.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6bdc3eb

Please sign in to comment.