MuseScore
MuseScore copied to clipboard
[MU4 Issue] Project settings has visual overflow despite hardcoded size
Describe the bug In the project settings, the label "MuseScore-Version" doesn't fit in its fixed-size space, causing ellipsis to be displayed instead: "MuseScore-Ve…"
To Reproduce Steps to reproduce the behavior:
- Open MuseScore
- In the Menu, go to "File > Project settings" (I guess; in the German version it's "Datei > Projekteigenschaften")
Expected behavior All text labels should be legible, or at least there should be a way to make them legible (resizable window, resizable container, scrolling, tooltip).
Screenshots
Platform information
- OS: Linux
- German locale
- I'm not entirely sure about my font-setup, but I would assume that all relevant fonts are installed (most importantly all microsoft-fonts are there), so that shouldn't be an issue.
Additional context Those hardcoded sizes seem to be a real bummer :/ Related, but different window: #15395
Hi, if no one's taken this I can grab it! Am new to this project so may need some guidance, will hopefully put up a PR soon (today?) 😅
@thewindsofwinter Welcome! Feel free to work on this.
[…] Am new to this project so may need some guidance […]
Have you discovered the MuseScore Discord server? It's the best place to ask questions relating to MuseScore development. You can join here: https://discord.gg/HwHhXEbJ4r
Thanks for the resources!
Hi, are you still working on this? @thewindsofwinter 😊
Hey i noticed that the code relevant to this issue happens to be in the musescore-old repo now does that mean is it still open to work or not? if it is, do i fork the musescore-old repo and work on it?
You shouldn't do anything with the musescore-old repo, and that repo has nothing to with any recent version of MuseScore. Everything is in this repo, and the relevant code for this issue is in the file called ProjectPropertiesDialog.qml
(or in the files referenced from there).
It appears that there aren't currently any assignees on this issue. I'd love to try my hand at this as a first issue.

Can confirm that the issue occurs on macOS w/ US English locale, as well.
Update- I replaced the inherited, hard-coded propertyNameWidth value with t_metrics.tightBoundingRect.width
, which obtains the width of an "imaginary" bounding box surrounding the text. This fixes the truncation, as shown below:
Using this bounding-box value instead of a hard-coded value also allows the sizing to adapt to other languages:
Since this issue only pertains to the "Musescore version" field, I only altered that particular element.
I've created a pull request: #17019
Hi! Sorry for this: wasn't sure how to test different displays on Windows, so was having a lot of trouble figuring out whether stuff was working. Glad someone else picked it up, really sorry about the delay.
@ryan-roche
Can you explain to me what the t_metrics
object is? I can't find any information about it anywhere, and it's not in the qt source code (version 5.15.3).
In any case, it seems like it's some private property, and in QML it's better not to use such properties. We need to find a more straightforward solution that's easier to understand.
@jessjwilliamson We need your help first. Can you take a look and suggest the best way to solve this problem? Do you like Ryan's solution? (visually)
@ryan-roche Can you explain to me what the
t_metrics
object is? I can't find any information about it anywhere, and it's not in the qt source code (version 5.15.3). In any case, it seems like it's some private property, and in QML it's better not to use such properties. We need to find a more straightforward solution that's easier to understand.@jessjwilliamson We need your help first. Can you take a look and suggest the best way to solve this problem? Do you like Ryan's solution? (visually)
It's fine :)
Reg. t_metrics
, see https://stackoverflow.com/questions/36364168/can-i-get-the-real-width-height-of-a-text-element
We can just remove this line and it works for me https://github.com/musescore/MuseScore/pull/17019/files#diff-0ad192bd592b87f013eebf577fe0a6e74d2a5c7e9c590658765fa6ed633fbabeL81
@ryan-roche can you confirm my guess?
We can just remove this line and it works for me https://github.com/musescore/MuseScore/pull/17019/files#diff-0ad192bd592b87f013eebf577fe0a6e74d2a5c7e9c590658765fa6ed633fbabeL81
@ryan-roche can you confirm my guess?
@Eism At least for me (Linux), this works; I created a pull request (#19280) which does exactly that