From f320230b304779fbef6ba085cae72c8f53f788a6 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Thu, 2 May 2019 11:02:06 +0200 Subject: [PATCH] make sure that the icon theme is properly loaded when the prefs are reloaded. --- src/musredit_qt5/musredit/PTextEdit.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/musredit_qt5/musredit/PTextEdit.cpp b/src/musredit_qt5/musredit/PTextEdit.cpp index 074e30e1..ee679c6a 100644 --- a/src/musredit_qt5/musredit/PTextEdit.cpp +++ b/src/musredit_qt5/musredit/PTextEdit.cpp @@ -1309,6 +1309,22 @@ void PTextEdit::fileOpenPrefs() msg = QString("Prefs from '") + fln + QString("' loaded."); QMessageBox::information(nullptr, "Info", msg); } + + // make sure that dark/plain icon scheme is properly loaded + if (getTheme()) { + switchMenuIcons(); + switchToolbarIcons(); + } + + if (fAdmin->getDarkThemeIconsMenuFlag() != fDarkMenuIcon) { + fDarkMenuIcon = !fDarkMenuIcon; + switchMenuIcons(); + } + + if (fAdmin->getDarkThemeIconsToolbarFlag() != fDarkToolBarIcon) { + fDarkToolBarIcon = !fDarkToolBarIcon; + switchToolbarIcons(); + } } //----------------------------------------------------------------------------------------------------