PREF_SCORE_STYLE_DEFAULTSTYLEFILE

• Dec 3, 2018 - 17:25

This constant name would seem to indicate that there is a default .mss file for styles. I don't see any such file. I just want to confirm that the default styles are not stored in any file, but are all hardcoded inside the styleTypes array in style.cpp.


Comments

In reply to by Jojo-Schmitz

It could also use the hardcoded defaults to reset things too. I am (soon) proposing to add a Reset to Defaults button to the Styles and Page Settings dialogs, just like the one in the Preferences dialog. I have a branch where I am doing this, along with all my other page settings fixes.
In this same (proposed) branch, I have added a Save Current Style as Default and Save Current Style as Default for Part button, overlapping with the Preference settings. It makes a lot of sense from a user perspective.

In reply to by sideways

FYI - the reason this relates to the larger issues with page settings is defaults by locale. In this same branch, I am using the user's locale settings to determine whether to default to millimeters or inches. If it's inches, then the default page size is US Letter 8.5" x 11". Otherwise it's the current default of A4. I'm also defaulting the margins differently for the US Letter size, in inches.

Adding the reset to default and save as default buttons seemed like a natural enhancement to layer on top of these changes.

In reply to by sideways

I would greatly appreciate a thumbs up or down on these changes I am making (new buttons, defaulting enhancements). If it's a thumbs down, then I need to know asap. If it's a thumbs up, then I'll save a link to this discussion for later use :-) Thanks.

In reply to by sideways

I think the reset to default buttons should reset to whatever style is loaded into the score if it's different than the factory defaults. This is true if the style comes from a template or Load Style... I'm not sure that's what your plan is already or not. Having a default.mss to load for this purpose is not a bad idea if someone wants to start with a "clean" slate.

In reply to by mike320

My plan is to reset to whatever the default is at that time. If the user has a default.mss specified (the file name can be anything.mss) in the Score Preferences, it will use that. If not, it will use the hardcoded defaults from style.cpp.
If you want to reset to a style you loaded from a file: reload that style and it accomplishes the same thing.
If it comes from a template: I'll have to look into that and see what it involves. I'll let you know how that looks when I get that far into it. You can't reapply a template, can you?

If there is a desire to move the hardcoded defaults to a MuseScore file actually named default.mss, that's possible, but I tend towards making as few changes as possible. I believe there is a reason for hardcoding those values in style.cpp instead of using a default.mss file.

In reply to by sideways

You can't reapply a template, but you could create a score from the template, save a .mss then load the .mss into the other score. This isn't the most obvious workaround though.

My idea was to have the default.mss that contains the settings in style.cpp for the "clean slate" I referred to. This would enable the user to basically reset the score to factory settings if there is a style setting they are having difficulty finding to reset or if they decided they needed to simply start over. BTW default.mss is not what it has to be called, but it would make sense.

This is less critical in version 3 than it was in version 2 because in 3 you can click a button to restore a default. In helping people in version 2 there were a few times I told the other user to just start over because they had made too many changes to their style settings and I didn't have a simple reference with the defaults. Having the default.mss option in those situations would have been nice for the other user. Like I said, it happened 2 or 3 times in 3 years.

In reply to by mike320

Those "clean slate" settings are hardcoded in style.cpp, in the styleTypes array:
https://github.com/musescore/MuseScore/blob/e32d3b6ba8ecada2b5c665e3ddd…
The current implementation is not an obstacle to the UI functionality you seek. The "clean slate" button can be implemented without using a .mss file.

To complete the loop: If you created a score using a custom default style file (Score Preferences), but you want to revert all the way back to the "factory" defaults: You must first clear the default style file in Score Preferences, then you must press this new "clean slate" reset button. Clumsy. There could be a reset to "factory" settings button, an additional button. That's clumsy too, relative to how often it might be used (not very often). That's something to mull over. I don't have a preference or opinion on that one, though I would tend towards fewer new buttons = less change.

In reply to by sideways

...actually that's not accurate. If you have a default .mss file specified in the Score Preferences, you can always reset your score to that via the Load Style... menu option. So the reset button should be a reset to "factory" button.

Restoring to original template is still an open question.

Do you still have an unanswered question? Please log in first to post your question.