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

HiDPI fractional scaling: remove rounding to int #4846

Merged
merged 1 commit into from Apr 10, 2020

Conversation

elgiano
Copy link
Contributor

@elgiano elgiano commented Mar 31, 2020

Purpose and Motivation

Fixes #4844

Types of changes

  • Bug fix

To-do list

  • Code is tested (ctest + existing UnitTests)
  • All tests are passing (ctest + existing UnitTests)
    Specific testing would require changing the user's HiDPI settings, which can't be done from sc
  • Updated documentation (not needed IMO)
  • This PR is ready for review

@mossheim
Copy link
Contributor

mossheim commented Apr 1, 2020

@elgiano thanks for this! just want to note that appveyor CI failing is not your fault, it's an unrelated issue that i'm working to resolve.

@elgiano
Copy link
Contributor Author

elgiano commented Apr 2, 2020

I'm adding Qt::AA_EnableHighDpiScaling in two places: one for sclang and one for scide.
This is equivalent on Linux to setting QT_AUTO_SCREEN_SCALE_FACTOR or the new QT_ENABLE_HIGHDPI_SCALING env vars (but it is overridable by them: i.e. you can cancel its effect by setting QT_AUTO_SCREEN_SCALE_FACTOR to 0)

The benefit (on Linux) is that scide and sclang figure out how to scale themselves automatically, without me needing to set any env var (which I can still do if I want things different).
I think it's a good feature, and hope it could maybe do something regarding #2442 on Windows, as it automatically scales widgets and HelpBrowser text (on my machine!).

@dyfer lets set up something on slack and test it out?
@brianlheim one question: do you think it is best to include these flags in this PR (maybe renaming it) or to create a new one?

@mossheim
Copy link
Contributor

mossheim commented Apr 2, 2020

@elgiano if you're going to do more work/testing on this it would be good to split it into 2 PRs at this point before it gets messy :)

@elgiano
Copy link
Contributor Author

elgiano commented Apr 2, 2020

@brianlheim I agree.
Even if for now it looks like a small addition, I will move those flags and further experimentation/testing to another PR

@mossheim mossheim added the comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead label Apr 4, 2020
@elgiano elgiano mentioned this pull request Apr 4, 2020
4 tasks
Copy link
Member

@dyfer dyfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on macOS and it works fine, i.e. does not introduce any side effects in the sclang GUI.
For the record, this will also be needed in addition to #4850 for non-integer scaling (125/150/175%) on Windows (and possibly Linux?)

@elgiano
Copy link
Contributor Author

elgiano commented Apr 5, 2020

(and possibly Linux?)

Yes, Linux is actually the system I originally addressed in #4844 and this PR. And #4850 makes fractional scaling easier (more automatic, still customizable) on Linux too.

@mossheim
Copy link
Contributor

looks good, thanks!

@mossheim mossheim merged commit 71870bf into supercollider:develop Apr 10, 2020
@elgiano elgiano deleted the fractionalScaling branch April 10, 2020 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HiDPI] QcCanvas doesn't handle fractional scaling
3 participants