text scaling glitch when start musescore with 100% scaling but then increase scaling on Windows display settings
I'm having trouble reproducing this...but it happened once, on latest master (12d0e18). Basically I told windows to set one monitor to have a different scaling than another monitor. But text appeared with a normal size in one monitor:
would be increased in size relative to the rest of the score view elements when moved to the other monitor with different scaling:
As you can see the "Title" text grew in size to become taller than before such that it crossed over the line representing to the top of the title text box.
Again I can't reproduce...but I have 3 monitors on windows and was messing with scaling settings and also using my GPU control panel to change settings as well (e.g. gpu scaling or not). I don't know the problem, but likely has something to do with the fact that systemQGuiApplication::devicePixelRatio() returns the highest screen device pixel ratio found on the system (as opposed to QWindow::devicePixelRatio() instead which only is concerned with current window) https://doc.qt.io/qt-5/qguiapplication.html#devicePixelRatio
Comments
I managed to reproduce the behavior:
I was basically on a %100 resolution all monitors, and was logged into windows like that. I had been debugging musescore. Things were working fine. I had musescore on my right (non-primary) monitor, and I right-clicked the desktop on that monitor, went to display settings, and changed the scaling to the maximum of %175. That it when I noticed all the text get big. Dragging back left to my primary window would restoring scaling (upon my dragging crossing the boundary) to normal such that everything was fine.
I can always reproduce this now. The important thing for reproducing is to have all my displays at %100 scaling prior to starting MuseScore. Once MuseScore is running, if I increase the scaling on the window that MuseScore is currently on, then the MuseScore scoreview text will incorrectly be increased.
I should note that it even happens if done on my primary window.
Additionally the GUI text is enlarged but without the GUI spacing being enlarged, so most of the GUI text is partially cutoff by neighboring gui elements.
The glitch also occurs if I the scaling is applied to the window musescore is not currently on if I then move musescore onto the scaled window. So to repeat steps:
b. If musescore wasn't on that scaled display, the text is initially fine, but will be messed up the moment I drag musescore window to the scaled display.
Note: I'm noticing the scoreview visual area does not increase when I drag musescore from the 100%-scaled window over to the >%100-scaled window when the glitch is happening. But the glitch isn't happening (i.e. if I first scale the displays before starting musescore), then what happens when I move the window to the scaled window is that the score view area actually increases, and the GUI in objects in general increase in size proportionately.
So it is almost as if it is not the text which is being scaled incorrectly, but rather it is the GUI and scoreview area which is not being scaled.
So I've determined that there is a realiable workaroudn, and that is to simply restart musescore.
The problem only seems to occur when starting MuseScore with %100 scaled display and then increasing the scaling while musescore is running.
In this case, since there is a workaround, I'm lowering the priority.
Ideally Qt would provide a signal which could be detected. Or maybe even Qt could automatically handle all this stuff???
I'm trying out another Qt app "Sonic Visualizer" (uses Qt 5.11.2) and I notice basically the same problem. So this might actually be a Qt problem. Should I file a bug report to Qt?
In reply to I'm trying out another Qt… by ericfontainejazz
You can, indeed. Let's see what they will answer.
And it is still a bug, btw.
As I'm not 100% confident it is a Qt bug, I've asked in their forums instead of their bug tracker: https://forum.qt.io/topic/97969/scaling-bug-on-win-10-if-start-qt-progr…