Skip to content

Commit

Permalink
Merge pull request #5922 from SKefalidis/prefs
Browse files Browse the repository at this point in the history
fix #293203 + preference rework: improved responsiveness, ease of adding preferences, UI
  • Loading branch information
anatoly-os committed Jun 10, 2020
1 parent 136467c commit bbacdf0
Show file tree
Hide file tree
Showing 8 changed files with 1,491 additions and 558 deletions.
1 change: 1 addition & 0 deletions global/settings/types/preferencekeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// Defines for all preferences
// Every preference should have a define to ease the usage of the preference
// Make sure the string key has a sensible grouping - use / for grouping
// If the preference has to do with the UI/STYLE/THEME, add it under ui (so that the view is updated when apply is pressed)
//
#define PREF_APP_AUTOSAVE_AUTOSAVETIME "application/autosave/autosaveTime"
#define PREF_APP_AUTOSAVE_USEAUTOSAVE "application/autosave/useAutosave"
Expand Down
5 changes: 3 additions & 2 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ void updateExternalValuesFromPreferences() {
// preferencesChanged
//---------------------------------------------------------

void MuseScore::preferencesChanged(bool fromWorkspace)
void MuseScore::preferencesChanged(bool fromWorkspace, bool changeUI)
{
updateExternalValuesFromPreferences();

Expand All @@ -460,7 +460,8 @@ void MuseScore::preferencesChanged(bool fromWorkspace)
getAction("show-tours")->setChecked(preferences.getBool(PREF_UI_APP_STARTUP_SHOWTOURS));
_statusBar->setVisible(preferences.getBool(PREF_UI_APP_SHOWSTATUSBAR));

MuseScore::updateUiStyleAndTheme();
if (changeUI)
MuseScore::updateUiStyleAndTheme(); // this is a slow operation
updateIcons();

QString fgWallpaper = preferences.getString(PREF_UI_CANVAS_FG_WALLPAPER);
Expand Down
2 changes: 1 addition & 1 deletion mscore/musescore.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ class MuseScore : public QMainWindow, public MuseScoreCore {
void openRecentMenu();
void selectScore(QAction*);
void startPreferenceDialog();
void preferencesChanged(bool fromWorkspace = false);
void preferencesChanged(bool fromWorkspace = false, bool changeUI = true);
void seqStarted();
void seqStopped();
void cmdAppendMeasures();
Expand Down
Loading

0 comments on commit bbacdf0

Please sign in to comment.