MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

[MU4 Issue] Project settings has visual overflow despite hardcoded size

Open BenWiederhake opened this issue 2 years ago • 1 comments

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:

  1. Open MuseScore
  2. 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 Bildschirmfoto_2022-12-20_01-55-03

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

BenWiederhake avatar Dec 20 '22 01:12 BenWiederhake

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 avatar Jan 17 '23 17:01 thewindsofwinter

@thewindsofwinter Welcome! Feel free to work on this.

cbjeukendrup avatar Jan 18 '23 17:01 cbjeukendrup

[…] 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

RobFog avatar Jan 18 '23 19:01 RobFog

Thanks for the resources!

thewindsofwinter avatar Jan 18 '23 23:01 thewindsofwinter

Hi, are you still working on this? @thewindsofwinter 😊

Ts0117 avatar Mar 09 '23 12:03 Ts0117

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?

ayushsingh01042003 avatar Mar 25 '23 10:03 ayushsingh01042003

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).

cbjeukendrup avatar Mar 25 '23 18:03 cbjeukendrup

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.

ryan-roche avatar Mar 26 '23 17:03 ryan-roche

image

Can confirm that the issue occurs on macOS w/ US English locale, as well.

ryan-roche avatar Mar 26 '23 18:03 ryan-roche

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: image

Using this bounding-box value instead of a hard-coded value also allows the sizing to adapt to other languages: image

Since this issue only pertains to the "Musescore version" field, I only altered that particular element.

I've created a pull request: #17019

ryan-roche avatar Mar 26 '23 20:03 ryan-roche

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.

thewindsofwinter avatar Mar 27 '23 03:03 thewindsofwinter

@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)

Eism avatar May 10 '23 09:05 Eism

@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 :)

jessjwilliamson avatar May 10 '23 10:05 jessjwilliamson

Reg. t_metrics, see https://stackoverflow.com/questions/36364168/can-i-get-the-real-width-height-of-a-text-element

Jojo-Schmitz avatar May 10 '23 10:05 Jojo-Schmitz

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 avatar May 11 '23 08:05 Eism

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

MaxiSchwindler avatar Sep 04 '23 20:09 MaxiSchwindler