MuseScore
MuseScore copied to clipboard
Line style options for text line elements
Resolves: #17757
This PR introduces style settings for the 'system text line' and 'text line' elements.
Questions:
- Should the style pages of system text lines and text lines be combined?
- Should the 'hook height' option be made available in the dialog? Currently, like for pedals, it's only accessible via the properties panel.
- Since text lines are often used above and below the staff, should there be a hook height style setting for each?
- Staff text lines and other line objects (Palette items 'Line' or note anchored lines) all use the same values for line width, is a new style setting for the latter worth considering?
- [x] I signed the CLA
- [x] The title of the PR describes the problem it addresses
- [x] Each commit's message describes its purpose and effects, and references the issue it resolves
- [ ] If changes are extensive, there is a sequence of easily reviewable commits
- [x] The code in the PR follows the coding rules
- [x] There are no unnecessary changes
- [x] The code compiles and runs on my machine, preferably after each commit individually
- [ ] I created a unit test or vtest to verify the changes I made (if applicable)
Is it reasonable to also add "Allow diagonal", and to make it is exposed in the Properties panel?
I know, that's kind of a separate issue - the fact that "allow diagonal" is currently missing from Properties for some lines. But if the goal here is to create a generally more consistent set of styles and properties, that one is very much missed right now.
I would like to hear @oktophonie's opinion on this- as you mentioned, the option isnt exposed for all other line elements either. Perhaps more style options should be added to different line types as well.
It's there for hairpins, but was somehow removed for other line types. It's definitely necessary in many cases for things like various harp notations, functional analysis, annotations for educational materials, graphic notation, etc. I actually just ran into this a couple of days ago and had it on my to-do list to open an issue next week. But since I saw this PR, I thought it worth bringing up here. I'm happy to just open the issue separately, though, as I was originally planning.
I know there was a deliberate effort to simplify the properties panel by removing seldom-used options that don't have good use cases, but diagonal lines are hardly a niche thing. I could imagine a decision to keep "allow diagonal" off the properties panel for certain specific line types where one could reasonably say there is no reason to ever make them diagonal. But for generic staff/system text lines, I think there should be no question that is is quite necessary functionality.
Workaround for now has been to enable the diagonal on a line in MU3, save the score, open the score in MU4, then add the already-customized line to the palette. So the property is definitely there and working, it just isn't exposed. But it's not really reasonable to expect people to have to do all that.
Interestingly, diagonal lines work for the textline thats just called 'line' in the lines palette, and you can add text in front of that. Perhaps its worth distinguishing between those two types as well... (so having 3 separate types of text lines: lines, staff text lines, & system text lines)
Oh, that's great to know - a much better workaround! Especially since you can also add hooks etc - these really are staff text lines, they just have the allow diagonal property pre-enabled, it seems (so functionally the same as my more cumbersome workaround).
@XiaoMigros please fix the failed unit tests