add a dark_theme flag to the mupp_startup.xml. This is can help if mupp at runtime cannot decide on the used theme.

This commit is contained in:
2020-05-02 14:29:04 +02:00
parent 6d0666f285
commit 40fcc228fa
4 changed files with 27 additions and 2 deletions

View File

@ -827,6 +827,14 @@ void PmuppGui::getTheme()
QString str = QIcon::themeName();
if (str.isEmpty()) {
if (fAdmin->isDarkTheme()) {
fDarkTheme = true;
fDarkToolBarIcon = true;
}
return;
}
if (str.contains("dark", Qt::CaseInsensitive)) {
fDarkTheme = true;
if (str.contains("ubuntu", Qt::CaseInsensitive)) {
@ -835,6 +843,8 @@ void PmuppGui::getTheme()
fDarkToolBarIcon = true;
}
}
QMessageBox::information(0, "INFO", QString("str='%1', fDarkTheme=%2").arg(str).arg(fDarkTheme));
}
//----------------------------------------------------------------------------------------------------