Problems with loading styles

• Jul 3, 2016 - 18:12

The MuseScore style switch does not actually load the style, even though the (correct) whole path is specified.

~$ musescore --style /home/(My login directory)/.musescore/Styles/MyDefault.mss
(starts MuseScore with the MuseScore default style but not MyDefault.mss).

~$ cat /home/(My login directory)/.musescore/Styles/MyDefault.mss
(lists the style sheet).

The Load Style dialog requires a workaround to display the style. Initially it shows "Look in:" with the correct path. In the side box it displays three directories: (my login, "Styles", and "styles"). In the main box it displays the root directory ("/").

It should not display the selection of styles if I click on "Styles", but it doesn't do it unless I first click on my directory and THEN click on "Styles". The "Look in:" display does not change. In other words, the availability of styles should not depend on the sequence of selecting directories.

The style works correctly once it is selected.

Is the ~/.musescore/ directory deprecated? I believe ~/Documents/MuseScore2/ is an unconventional place to store a profile. It's also inconvenient because it isn't hidden. I would hate for all my application profiles to be stored in ~/Documents/.

I have 2.0.2 under Ubuntu 14.04. I think the behavior is the same under 2.0.3.


1. I believe the "--style" command option is intended for command line conversions only; it doesn't affect anything about the state of the MuseScore GUI. If your intent is to change the default style so that new scores created from scratch get non-default settings,specify your file in Edit / Preferences / Score.

2. I am not quite understanding. Can you be more specific about the extact steps you are following, what you expect to see happen and what happens instead? For me, when I first invoke Style / Load, it tells me it is looking in ~/MuseScore2/Styles, and that is exactly what it does.

3. MuseScore2 is not "profile" folder in the sense I think you mean; it's a place where all your created files go - the scores, templates, and styles you save, the soundfonts and plugins you download, etc. It would be inappropriate for this to be in a hidden folder. I'm not sure what ".musescore" is. There is what I think maybe you mean by "profile" - the "ini" file where settings are stored, , although the location varies by OS. On Ubuntu, it's ~/.config/MuseScore, which seems appropriate to me. There is also another folder where things like autosave files are kept, that's also normally hidden and OS-specific.

In reply to by Marc Sabatella

1. OK, but it's odd that the switch does not apply to the GUI, since normally the action of the command line is to start the GUI.

*** But in any case,
"specify your file in Edit / Preferences / Score"
doesn't work either. *** Even though the entire path is specified, MS definitely does not load the style sheet when it's restarted. Here's a screen shot.
(The style sheet does work if it's loaded manually, so it is valid.)

Unfortunately, I can't get the style to load automatically.

3. OK.

In reply to by RexC

It would be meaningless to load a style into the GUI. Styles are properties of individual scores; they aren't global to the program. This also applies to the Preference. You style *is* honored when you specify it. To see this, create a new new score from scratch - ie, not using a template. You'll find your style settings are applied.

In reply to by Marc Sabatella

OK, after quite a bit of digging, I see how this is intended to work. And it does work quite well with templates. I still think the dialog box is broken, however. See #2.

I think the problem might be with the documentation and interface, although I don't know what to suggest--if anything. I could mess with the documentation, but I don't think it's a good idea. You might want to know about some possible sources of confusion. Here's what I found:

** The -h switch says "-S, --style Load style file". (Lacks essential information)

** The online manual provides more info, but is still a bit cryptic:
"-S, --style
Loads a style file; useful when you convert with the -o option"

** Then there's a menu entry, Edit/Preferences/Score/Default Files--Style:
(No documentation found, and it doesn't do what I expected.)

** The online manual goes on further to say:
Determines the style of the GUI application."
Sets the application stylesheet. The value of "stylesheet" is a path to a file that contains the stylesheet" (Allows me to specify a file.)

Several other switches are listed. The documentation specifically mentions using style switches to determine the GUI, and to load style sheets from files. There are some little clues, but in hindsight I see that nowhere does it actually say that any of the switches will apply a style sheet to a file. Tricky tricky.

I suppose it's my fault for not reading the Handbook from the beginning. I'm not sure what changes I would recommend in the documentation.

In reply to by RexC

-style is different from --style. The former is a Qt-ism, allows you to customize the look and feel of the GUI itself. It has nothing to do with score styles in MuseScore, which is what --style has to do with. An unfortunate similarity in names, but we have no control over how Qt names things.

In reply to by Marc Sabatella

Perhaps some screen shots will help. I've checked this out on two absolutely new accounts, so there is no question of influence by nondefault settings or prior history. Version 2.0.3 on Ubuntu 14.04 32-bit.

Steps to reproduce:

A. Default operation (works correctly)
1) Create new account.
2) Copy style sheets to ~/Documents/MuseScore2/Styles/
3) Menu: Styles/Load styles...
Result: The dialog box works correctly. Screen shot:

B. Nondefault operation
1) Create new account.
2) Copy style sheets to ~/.musescore/Styles.
3) Start MS and Edit/Preferences/Styles ==> /home/musetest4/.musescore/Styles
4) Restart MS.
3) Menu: Styles/Load styles...
Result: Dialog box should display style sheets but does not. Screen shot:
The directory display shown in the screen shot shows that the style sheets are indeed in the correct directory.

4) On the left, click on "Styles".
Result: Tool tip shows that "Styles" really is the correct directory, but the dialog box STILL does not display style sheets.

5) On the left, click on "musetest4" and then "Styles".
Result: Dialog box finally shows the style sheets.

In this case I chose a hidden directory, but it makes no difference if the directory is not hidden. In either case the dialog box doesn't seem to work correctly. As far as I can remember, it has never worked correctly.

In reply to by RexC

OK, I wasn't understanding from your original report that you were using a custom Styles folder. I can't reproduce - for me, it works correctly even following those steps (Ubuntu 14.04 with xfce4). But I could imagine that on some OS's, information might be cached in a way that requires an explicit refresh or something, hence the need for the extra couple of clicks. I assume, though, that after this initial glitch, all is well?

In reply to by Marc Sabatella

Yes, it works well after the glitch. But I think the behavior may be hard-coded somehow in MS. If it takes the path from the Styles preference menu entry, one would think there should be absolutely no difference between ~/Documents/MuseScore2/Styles and some other directory. After all, it's just a choice of two text strings. But the problem always happens (and only happens) if the choice is not the default value.

In reply to by RexC

All I can say is, it works as expected for me, so whatever is going on seems to be system-dependent in some way.

Could have somethng to do with the fact that certain folders can be aliases for others because of links etc and this might confuse the caching system in the OS or in Qt (the libraries we rely on for stuff like this).

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