Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Mscore::DPI from logical DPI not physical #505

Merged
merged 1 commit into from Oct 29, 2013

Conversation

softins
Copy link
Contributor

@softins softins commented Oct 20, 2013

Currently, when editing chord names, they appear larger than when not in edit mode. This appears to be due to Mscore::DPI having been set to the physical DPI of the screen, but the QTextDocument uses the logical DPI.
Setting MScore::DPI to the logical DPI fixes the change of size when editing chord names. It also appears to make MuseScore correctly obey the user's display scaling set in the Windows control panel.

This change hasn't been tested on Mac or Linux, but it seems from the comment that DPI should be set from the logical DPI anyway.

@Jojo-Schmitz
Copy link
Contributor

See also http://musescore.org/en/node/23051

@MarcSabatella
Copy link
Contributor

I have no idea what the ramifications of this would be in general, or how common the issue of different physical and logical DPI values (as reported by Qt) is. But given things are not great for some of us now, it seems it would make sense to try this out and see if it makes things worse for anyone in any way. If so, then maybe roll it back, otherwise leave it in.

@softins
Copy link
Contributor Author

softins commented Oct 28, 2013

Well on my Windows 7 with external monitor, the debug output from MuseScore reports 72dpi (approx) as the physical DPI, but the logical DPI depends on the display scaling set in the control panel. On my system it is 96dpi when at 100%, 120dpi when at 125%, and 144dpi when at 150%. Standard apps will scale themselves dependent on the logical DPI. Without the above change, at least some parts of MuseScore, including the score, do not scale (I haven't checked exhaustively), but the QTextDocument does scale automatically. As QTextDocument is used in edit mode only, for chord symbols, that is why edit mode can be a different size from the rendered symbols.

@lasconic
Copy link
Contributor

On MacOSX some texts (Instrument names in particular) appears smaller than usual. With this pull request, these texts looks better. I'm afraid that something changed between Qt 4 and Qt 5. Apparently in Qt5 the logical DPI is somehow used to scale the texts.

On a related matter, PDPI is never used in the code as far as I can tell. Only DPI is used.

@lasconic
Copy link
Contributor

Let's try it on a larger scale.

lasconic added a commit that referenced this pull request Oct 29, 2013
Set Mscore::DPI from logical DPI not physical
@lasconic lasconic merged commit 3f9bd75 into musescore:master Oct 29, 2013
heuchi pushed a commit to heuchi/MuseScore that referenced this pull request Nov 13, 2013
Set Mscore::DPI from logical DPI not physical
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants