mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Fixed font settings (issue as reported by RW via slack)
* font change triggers style sheet reload * now font settings are stored in copied qss file, so original file can be restored
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <QStyle>
|
||||
#include <QScopedPointer>
|
||||
#include <QSettings>
|
||||
#include <QFileSystemWatcher>
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
@@ -68,6 +69,12 @@ namespace BlackGui
|
||||
//! File name fonts.qss
|
||||
static const QString &fileNameFonts();
|
||||
|
||||
//! Name for user modified file
|
||||
static const QString &fileNameFontsModified();
|
||||
|
||||
//! Delete the modified file for fonts
|
||||
bool deleteModifiedFontFile();
|
||||
|
||||
//! File name infobar.qss
|
||||
static const QString &fileNameInfoBar();
|
||||
|
||||
@@ -137,9 +144,14 @@ namespace BlackGui
|
||||
//! \deprecated use BlackGui::CGuiApplication::styleSheetsChanged
|
||||
void styleSheetsChanged();
|
||||
|
||||
private slots:
|
||||
//! File changed
|
||||
void ps_qssDirectoryChanged(const QString &file);
|
||||
|
||||
private:
|
||||
QMap<QString, QString> m_styleSheets; //!< filename, stylesheet
|
||||
QMap<QString, QString> m_styleSheets; //!< filename, stylesheet
|
||||
QScopedPointer<QSettings> m_iniFile;
|
||||
QFileSystemWatcher m_fileWatcher {this}; //!< Monitor my qss files
|
||||
};
|
||||
}
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user