More flexible dark scheme handling

It works now as follows:
1) try to get theme information from the system, and if present us it.
2) if no theme information of the system is present, take the one from
   the musredit_startup.xml.

Now it is possible to switch the icon theme for the menu and toolbar
separately.
This commit is contained in:
2019-05-02 10:44:04 +02:00
parent 297522d6b1
commit 1d9be24be1
8 changed files with 183 additions and 127 deletions

View File

@@ -162,8 +162,8 @@ private slots:
void setFileSystemWatcherActive();
private:
bool fDarkTheme;
bool fDarkToolBarIcon;
bool fDarkMenuIcon; ///< flag indicating if a dark or plain icon shall be used in the menu pull-downs
bool fDarkToolBarIcon; ///< flag indicating if a dark or plain icon shall be used in the toolbar
PAdmin *fAdmin; ///< pointer to the xml-startup file informations. Needed for different purposes like default working- and executable directories etc.
QFileSystemWatcher *fFileSystemWatcher; ///< checks if msr-files are changing on the disk while being open in musredit.
bool fFileSystemWatcherActive; ///< flag to enable/disable the file system watcher
@@ -192,7 +192,8 @@ private:
QStringList getRunList(QString runListStr, bool &ok);
bool fileAlreadyOpen(QFileInfo &finfo, int &idx);
void switchIcons();
void switchMenuIcons();
void switchToolbarIcons();
};