Fix QDockWidget Header Background on macOS #290

This commit is contained in:
Florian Märkl 2018-02-03 21:00:31 +01:00
parent 51a79c89ac
commit 0dbadc59d8

View File

@ -229,7 +229,17 @@ void Configuration::loadDarkTheme()
{
f.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&f);
qApp->setStyleSheet(ts.readAll());
QString stylesheet = ts.readAll();
#ifdef Q_OS_MACX
// see https://github.com/ColinDuquesnoy/QDarkStyleSheet/issues/22#issuecomment-96179529
stylesheet += "QDockWidget::title"
"{"
" background-color: #31363b;"
" text-align: center;"
" height: 12px;"
"}";
#endif
qApp->setStyleSheet(stylesheet);
}
}